btrfs-progs: Correct value printed by assertions/BUG_ON/WARN_ON
authorGoldwyn Rodrigues <rgoldwyn@suse.com>
Tue, 29 Nov 2016 16:24:52 +0000 (10:24 -0600)
committerDavid Sterba <dsterba@suse.com>
Wed, 14 Dec 2016 14:06:35 +0000 (15:06 +0100)
commitdd2c2a4c67d509d90142b9443aa7449ef4257b2b
tree4bdc33bb327d3da16ad826e348c5a456d40f1a70
parent088ed0e5573a06c880bb6ef545df2e591424ee81
btrfs-progs: Correct value printed by assertions/BUG_ON/WARN_ON

The values passed to BUG_ON/WARN_ON are negated(!) and printed, which
results in printing the value zero for each bug/warning. For example:
volumes.c:988: btrfs_alloc_chunk: Assertion `ret` failed, value 0

This is not useful. Instead changed to print the value of the parameter
passed to BUG_ON()/WARN_ON(). The value needed to be changed to long
to accomodate pointers being passed.

Also, consolidated assert() and BUG() into ifndef.

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