From 48d0762f356ebe5d33b93e29377ce38ac17ab360 Mon Sep 17 00:00:00 2001 From: Wang Shilong Date: Mon, 7 Oct 2013 15:21:47 +0800 Subject: 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 Signed-off-by: David Sterba Signed-off-by: Chris Mason --- utils.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'utils.h') diff --git a/utils.h b/utils.h index a6d3e5ec..7a748266 100644 --- a/utils.h +++ b/utils.h @@ -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; \ }) -- cgit v1.2.3