aboutsummaryrefslogtreecommitdiff
path: root/console/console.c
diff options
context:
space:
mode:
authorJustus Winter <justus@gnupg.org>2017-06-19 21:20:57 +0200
committerJustus Winter <justus@gnupg.org>2017-08-05 18:42:22 +0200
commit835b293d35a209d38047126443d41fa7090daa4c (patch)
tree5bf956895e6030f91cd618fb191b2151f6d25423 /console/console.c
parentdc0b5a43224999223a246870912b0f292b1980e9 (diff)
downloadhurd-835b293d35a209d38047126443d41fa7090daa4c.tar.gz
hurd-835b293d35a209d38047126443d41fa7090daa4c.tar.bz2
hurd-835b293d35a209d38047126443d41fa7090daa4c.zip
Use our own variant of 'assert' and 'assert_perror'.
Our variants print stack traces on failures. This will make locating errors much easier.
Diffstat (limited to 'console/console.c')
-rw-r--r--console/console.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/console/console.c b/console/console.c
index 9c5869dd..94de0049 100644
--- a/console/console.c
+++ b/console/console.c
@@ -459,7 +459,7 @@ void
netfs_node_norefs (struct node *np)
{
/* The root node does never go away. */
- assert (!np->nn->cons && np->nn->vcons);
+ assert_backtrace (!np->nn->cons && np->nn->vcons);
free (np->nn);
free (np);
@@ -654,7 +654,7 @@ netfs_attempt_lookup (struct iouser *user, struct node *dir,
/* This is a virtual console directory node. */
vcons_t vcons = dir->nn->vcons;
int ref_vcons = 0;
- assert (dir == vcons->dir_node);
+ assert_backtrace (dir == vcons->dir_node);
if (!strcmp (name, "console"))
{
@@ -1057,7 +1057,7 @@ netfs_attempt_set_size (struct iouser *cred, struct node *np, off_t size)
|| np == vcons->disp_node)
return EOPNOTSUPP;
- assert (np == vcons->cons_node || np == vcons->inpt_node);
+ assert_backtrace (np == vcons->cons_node || np == vcons->inpt_node);
return 0;
}
@@ -1140,7 +1140,7 @@ netfs_attempt_read (struct iouser *cred, struct node *np,
{
/* Pass display content to caller. */
ssize_t amt = *len;
- assert (np == vcons->disp_node);
+ assert_backtrace (np == vcons->disp_node);
if (offset + amt > np->nn_stat.st_size)
amt = np->nn_stat.st_size - offset;
@@ -1187,7 +1187,7 @@ netfs_attempt_write (struct iouser *cred, struct node *np,
int amt;
/* The input driver is writing to the input device. Feed the
data into the input queue. */
- assert (np == vcons->inpt_node);
+ assert_backtrace (np == vcons->inpt_node);
amt = input_enqueue (vcons->input,
/* cred->po->openstat & O_NONBLOCK */ 1,