aboutsummaryrefslogtreecommitdiff
path: root/libcons/dir-changed.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 /libcons/dir-changed.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 'libcons/dir-changed.c')
-rw-r--r--libcons/dir-changed.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libcons/dir-changed.c b/libcons/dir-changed.c
index 8498649c..06c29701 100644
--- a/libcons/dir-changed.c
+++ b/libcons/dir-changed.c
@@ -20,7 +20,7 @@
#include <errno.h>
#include <dirent.h>
-#include <assert.h>
+#include <assert-backtrace.h>
#include <mach.h>
#include <pthread.h>
@@ -88,14 +88,14 @@ cons_S_dir_changed (cons_notify_t notify, natural_t tickno,
}
while (dent && !err);
if (err)
- assert ("Unexpected error"); /* XXX */
+ assert_backtrace ("Unexpected error"); /* XXX */
}
break;
case DIR_CHANGED_NEW:
{
err = add_one (cons, name);
if (err)
- assert ("Unexpected error"); /* XXX */
+ assert_backtrace ("Unexpected error"); /* XXX */
}
break;
case DIR_CHANGED_UNLINK:
@@ -120,7 +120,7 @@ cons_S_dir_changed (cons_notify_t notify, natural_t tickno,
break;
case DIR_CHANGED_RENUMBER:
default:
- assert ("Unexpected dir-changed type.");
+ assert_backtrace ("Unexpected dir-changed type.");
pthread_mutex_unlock (&cons->lock);
return EINVAL;
}