aboutsummaryrefslogtreecommitdiff
path: root/libdiskfs/node-cache.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 /libdiskfs/node-cache.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 'libdiskfs/node-cache.c')
-rw-r--r--libdiskfs/node-cache.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libdiskfs/node-cache.c b/libdiskfs/node-cache.c
index ee7e6fdb..d2815883 100644
--- a/libdiskfs/node-cache.c
+++ b/libdiskfs/node-cache.c
@@ -105,7 +105,7 @@ diskfs_cached_lookup_context (ino_t inum, struct node **npp,
err = hurd_ihash_locp_add (&nodecache, slot,
(hurd_ihash_key_t) &np->cache_id, np);
- assert_perror (err);
+ assert_perror_backtrace (err);
diskfs_nref_light (np);
pthread_rwlock_unlock (&nodecache_lock);
@@ -138,7 +138,7 @@ diskfs_cached_ifind (ino_t inum)
np = hurd_ihash_find (&nodecache, (hurd_ihash_key_t) &inum);
pthread_rwlock_unlock (&nodecache_lock);
- assert (np);
+ assert_backtrace (np);
return np;
}
@@ -233,7 +233,7 @@ diskfs_node_iterate (error_t (*fun)(struct node *))
error_t __attribute__ ((weak))
diskfs_user_make_node (struct node **npp, struct lookup_context *ctx)
{
- assert (! "diskfs_user_make_node not implemented");
+ assert_backtrace (! "diskfs_user_make_node not implemented");
}
/* The user must define this function if she wants to use the node
@@ -241,7 +241,7 @@ diskfs_user_make_node (struct node **npp, struct lookup_context *ctx)
error_t __attribute__ ((weak))
diskfs_user_read_node (struct node *np, struct lookup_context *ctx)
{
- assert (! "diskfs_user_read_node not implemented");
+ assert_backtrace (! "diskfs_user_read_node not implemented");
}
/* The user must define this function if she wants to use the node
@@ -250,5 +250,5 @@ diskfs_user_read_node (struct node *np, struct lookup_context *ctx)
void __attribute__ ((weak))
diskfs_user_try_dropping_softrefs (struct node *np)
{
- assert (! "diskfs_user_try_dropping_softrefs not implemented");
+ assert_backtrace (! "diskfs_user_try_dropping_softrefs not implemented");
}