summaryrefslogtreecommitdiff
path: root/disk-io.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2016-09-09 15:56:18 +0200
committerDavid Sterba <dsterba@suse.com>2016-09-21 11:49:48 +0200
commit3f100c5251b21dced5547b398e34d6de670fb96f (patch)
treef69a227164fffaa88558ad9607e88b4af594e0f9 /disk-io.c
parent2125a655332990ce8c3b9c9e17a71b3830d771cb (diff)
btrfs-progs: better error report in btrfs_scan_fs_devices
Print the found sizes. Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'disk-io.c')
-rw-r--r--disk-io.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/disk-io.c b/disk-io.c
index 7c52f12d..2fd3330f 100644
--- a/disk-io.c
+++ b/disk-io.c
@@ -1149,7 +1149,9 @@ int btrfs_scan_fs_devices(int fd, const char *path,
dev_size = seek_ret;
lseek(fd, 0, SEEK_SET);
if (sb_bytenr > dev_size) {
- fprintf(stderr, "Superblock bytenr is larger than device size\n");
+ error("superblock bytenr %llu is larger than device size %llu",
+ (unsigned long long)sb_bytenr,
+ (unsigned long long)dev_size);
return -EINVAL;
}