From 88fc7becac6c5864414890a6d3329cc8a48a48b5 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Tue, 27 Aug 2019 17:04:58 +0200 Subject: [PATCH] btrfs-progs: pretty print device size in overflow error message Signed-off-by: David Sterba --- common/device-scan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/device-scan.c b/common/device-scan.c index a51d3b1e..48dbd9e1 100644 --- a/common/device-scan.c +++ b/common/device-scan.c @@ -160,8 +160,8 @@ int btrfs_add_to_fsid(struct btrfs_trans_handle *trans, if (check_add_overflow(old_size, device_total_bytes, &new_size)) { error( - "adding device of %llu bytes would exceed max file system size", - device->total_bytes); + "adding device of %llu (%s) bytes would exceed max file system size", + device->total_bytes, pretty_size(device->total_bytes)); ret = -EOVERFLOW; goto out; }