From 835b293d35a209d38047126443d41fa7090daa4c Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Mon, 19 Jun 2017 21:20:57 +0200 Subject: Use our own variant of 'assert' and 'assert_perror'. Our variants print stack traces on failures. This will make locating errors much easier. --- fatfs/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'fatfs/main.c') diff --git a/fatfs/main.c b/fatfs/main.c index 00c56bc5..f0b3aa88 100644 --- a/fatfs/main.c +++ b/fatfs/main.c @@ -189,7 +189,7 @@ fetch_root () break; default: - assert(!"don't know how to set size of root dir"); + assert_backtrace (!"don't know how to set size of root dir"); }; /* The magic vi_key {0, 1} for the root directory is distinguished @@ -197,14 +197,14 @@ fetch_root () normal virtual inode keys (in the dir_inode value). Enter the disknode into the inode table. */ err = vi_new ((struct vi_key) {0, 1}, &inum, &ctx.inode); - assert_perror (err); + assert_perror_backtrace (err); /* Allocate a node for the root directory disknode in diskfs_root_node. */ if (!err) err = diskfs_cached_lookup_context (inum, &diskfs_root_node, &ctx); - assert_perror (err); + assert_perror_backtrace (err); pthread_mutex_unlock (&diskfs_root_node->lock); } -- cgit v1.2.3