mirror of
https://github.com/kdave/btrfs-progs
synced 2024-12-26 08:02:21 +00:00
btrfs-progs: print value when assertion fails
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
db64e0a636
commit
9adce1abe4
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user