btrfs-progs: kerncompat: disconnect assert and warning messages
authorDavid Sterba <dsterba@suse.com>
Tue, 24 Jan 2017 15:02:44 +0000 (16:02 +0100)
committerDavid Sterba <dsterba@suse.com>
Wed, 25 Jan 2017 08:48:23 +0000 (09:48 +0100)
The assertion and warn/bug have reversed condition checks, using the
same helpers drops the exact value, so we'll print the message directly
without the helpers.

Signed-off-by: David Sterba <dsterba@suse.com>
kerncompat.h

index 3362d25..5a543c2 100644 (file)
@@ -301,7 +301,9 @@ static inline void assert_trace(const char *assertion, const char *filename,
 {
        if (val)
                return;
-       warning_trace(assertion, filename, func, line, val);
+       fprintf(stderr,
+               "%s:%d: %s: Assertion `%s` failed, value %ld\n",
+               filename, line, func, assertion, val);
        abort();
        exit(1);
 }