btrfs-progs: better error report in btrfs_scan_fs_devices

Print the found sizes.

Signed-off-by: David Sterba <dsterba@suse.com>
master
David Sterba 2016-09-09 15:56:18 +02:00
parent 2125a65533
commit 3f100c5251
1 changed files with 3 additions and 1 deletions

View File

@ -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;
}