diff options
author | Zygo Blaxell <ce3g8jdj@umail.furryterror.org> | 2016-12-03 15:39:54 -0500 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-01-25 09:47:28 +0100 |
commit | 2f682fb89b0b69647a4d27f1de9b4f608b0c7895 (patch) | |
tree | 6f0a2c10854a84ec5519f3a2a572c3c6ba24f226 /utils.h | |
parent | e325c74bb8af9efa150cb16429a94f291209604f (diff) |
btrfs-progs: utils: negative numbers are more plausible than sizes over 8 EiB
I got tired of seeing "16.00EiB" whenever btrfs-progs encounters a
negative size value, e.g. during resize:
Unallocated:
/dev/mapper/datamd18 16.00EiB
This version is much more useful:
Unallocated:
/dev/mapper/datamd18 -26.29GiB
Signed-off-by: Zygo Blaxell <ce3g8jdj@umail.furryterror.org>
Reviewed-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'utils.h')
-rw-r--r-- | utils.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -174,9 +174,9 @@ int check_mounted_where(int fd, const char *file, char *where, int size, int btrfs_device_already_in_root(struct btrfs_root *root, int fd, int super_offset); -int pretty_size_snprintf(u64 size, char *str, size_t str_bytes, unsigned unit_mode); +int pretty_size_snprintf(s64 size, char *str, size_t str_bytes, unsigned unit_mode); #define pretty_size(size) pretty_size_mode(size, UNITS_DEFAULT) -const char *pretty_size_mode(u64 size, unsigned mode); +const char *pretty_size_mode(s64 size, unsigned mode); u64 parse_size(char *s); u64 parse_qgroupid(const char *p); |