btrfs-progs: print value when assertion fails
authorDavid Sterba <dsterba@suse.com>
Mon, 3 Oct 2016 13:41:25 +0000 (15:41 +0200)
committerDavid Sterba <dsterba@suse.com>
Wed, 5 Oct 2016 10:39:01 +0000 (12:39 +0200)
Signed-off-by: David Sterba <dsterba@suse.com>
kerncompat.h

index 8b9a84c..d2780dc 100644 (file)
@@ -85,11 +85,11 @@ static inline void assert_trace(const char *assertion, const char *filename,
        if (val)
                return;
        if (assertion)
-               fprintf(stderr, "%s:%d: %s: Assertion `%s` failed.\n",
-                       filename, line, func, assertion);
+               fprintf(stderr, "%s:%d: %s: Assertion `%s` failed, value %d\n",
+                       filename, line, func, assertion, val);
        else
-               fprintf(stderr, "%s:%d: %s: Assertion failed.\n", filename,
-                       line, func);
+               fprintf(stderr, "%s:%d: %s: Assertion failed, value %d.\n",
+                       filename, line, func, val);
        print_trace();
        exit(1);
 }