diff options
author | Justus Winter <justus@gnupg.org> | 2017-06-19 21:20:57 +0200 |
---|---|---|
committer | Justus Winter <justus@gnupg.org> | 2017-08-05 18:42:22 +0200 |
commit | 835b293d35a209d38047126443d41fa7090daa4c (patch) | |
tree | 5bf956895e6030f91cd618fb191b2151f6d25423 /libstore/part.c | |
parent | dc0b5a43224999223a246870912b0f292b1980e9 (diff) | |
download | hurd-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 'libstore/part.c')
-rw-r--r-- | libstore/part.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libstore/part.c b/libstore/part.c index 0ef2bd4b..349d90f5 100644 --- a/libstore/part.c +++ b/libstore/part.c @@ -21,7 +21,7 @@ #include "store.h" #include <stdlib.h> #include <errno.h> -#include <assert.h> +#include <assert-backtrace.h> #include <pthread.h> #include <parted/parted.h> @@ -99,7 +99,7 @@ store_part_create (struct store *source, int index, int flags, goto out; } - assert (ped_device_open (dev) != 0); + assert_backtrace (ped_device_open (dev) != 0); disk = ped_disk_new (dev); if (! disk) @@ -116,7 +116,7 @@ store_part_create (struct store *source, int index, int flags, && part->type != 0 /* PED_PARTITION_PRIMARY */) continue; - assert (part->num); + assert_backtrace (part->num); if (part->num == index) break; } @@ -155,7 +155,7 @@ store_part_create (struct store *source, int index, int flags, } out_with_disk: - assert (ped_device_close (dev) != 0); + assert_backtrace (ped_device_close (dev) != 0); ped_disk_destroy (disk); out_with_dev: ped_device_destroy (dev); |