aboutsummaryrefslogtreecommitdiff
path: root/utils/shd.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 /utils/shd.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 'utils/shd.c')
-rw-r--r--utils/shd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/utils/shd.c b/utils/shd.c
index feff6135..09a4790e 100644
--- a/utils/shd.c
+++ b/utils/shd.c
@@ -19,7 +19,7 @@
#include <hurd.h>
#include <stdio.h>
#include <string.h>
-#include <assert.h>
+#include <assert-backtrace.h>
#include <device/device.h>
#include <unistd.h>
#include <errno.h>
@@ -230,7 +230,7 @@ main (int argc, char *argv[])
size_t linebufsize = 0;
proc = getproc ();
- assert (proc);
+ assert_backtrace (proc);
#if 0
{
@@ -238,10 +238,10 @@ main (int argc, char *argv[])
mach_port_t outp;
mach_port_t hostp, masterd;
err = proc_getprivports (proc, &hostp, &masterd);
- assert (!err);
+ assert_backtrace (!err);
err = device_open (masterd, D_WRITE|D_READ, "console", &outp);
- assert (!err);
+ assert_backtrace (!err);
stdin = mach_open_devstream (outp, "r");
stdout = stderr = mach_open_devstream (outp, "w+");