aboutsummaryrefslogtreecommitdiff
path: root/libdiskfs/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 /libdiskfs/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 'libdiskfs/console.c')
-rw-r--r--libdiskfs/console.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libdiskfs/console.c b/libdiskfs/console.c
index a4c3a1af..74715b8b 100644
--- a/libdiskfs/console.c
+++ b/libdiskfs/console.c
@@ -24,7 +24,7 @@
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
-#include <assert.h>
+#include <assert-backtrace.h>
#include <mach/mach.h>
#include <device/device.h>
@@ -60,10 +60,10 @@ diskfs_console_stdio ()
if (diskfs_boot_filesystem ())
_diskfs_boot_privports ();
err = get_privileged_ports (NULL, &dev);
- assert_perror (err);
+ assert_perror_backtrace (err);
err = device_open (dev, D_READ|D_WRITE, "console", &cons);
mach_port_deallocate (mach_task_self (), dev);
- assert_perror (err);
+ assert_perror_backtrace (err);
stdin = mach_open_devstream (cons, "r");
stdout = stderr = mach_open_devstream (cons, "w");
mach_port_deallocate (mach_task_self (), cons);