From 3f100c5251b21dced5547b398e34d6de670fb96f Mon Sep 17 00:00:00 2001 From: David Sterba Date: Fri, 9 Sep 2016 15:56:18 +0200 Subject: [PATCH] btrfs-progs: better error report in btrfs_scan_fs_devices Print the found sizes. Signed-off-by: David Sterba --- disk-io.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/disk-io.c b/disk-io.c index 7c52f12..2fd3330 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; } -- 2.7.4