diff options
author | Wang Shilong <wangsl.fnst@cn.fujitsu.com> | 2013-10-07 15:21:47 +0800 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2013-10-16 08:23:12 -0400 |
commit | 48d0762f356ebe5d33b93e29377ce38ac17ab360 (patch) | |
tree | 0dd8fe6a2f9d6c3a974e5893868ba001101a848d /utils.h | |
parent | 133907d465945428d36242f8bbc9b7a5b49a26c5 (diff) |
Btrfs-progs: make pretty_size_snprintf() return len
Sometimes, we need to catch length of snprintf() in pretty_size_snprintf().
Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'utils.h')
-rw-r--r-- | utils.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -49,11 +49,11 @@ 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); -void pretty_size_snprintf(u64 size, char *str, size_t str_bytes); +int pretty_size_snprintf(double size, char *str, size_t str_bytes); #define pretty_size(size) \ ({ \ static __thread char _str[24]; \ - pretty_size_snprintf((size), _str, sizeof(_str)); \ + (void)pretty_size_snprintf((size), _str, sizeof(_str)); \ _str; \ }) |