Btrfs-progs print more informative error when we fail to open a device
print more informative error when we fail to open a device If open() fails, we should let the user know why it failed. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Gene Czarcinski <gene@czarc.net>
This commit is contained in:
parent
82ac34581e
commit
a8cb2d03dd
3
utils.c
3
utils.c
|
@ -1229,7 +1229,8 @@ scan_again:
|
||||||
|
|
||||||
fd = open(fullpath, O_RDONLY);
|
fd = open(fullpath, O_RDONLY);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
fprintf(stderr, "failed to read %s\n", fullpath);
|
fprintf(stderr, "failed to open %s: %s\n",
|
||||||
|
fullpath, strerror(errno));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
ret = btrfs_scan_one_device(fd, fullpath, &tmp_devices,
|
ret = btrfs_scan_one_device(fd, fullpath, &tmp_devices,
|
||||||
|
|
Loading…
Reference in New Issue