diff options
author | Eric Sandeen <sandeen@redhat.com> | 2013-02-04 10:57:57 -0500 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2013-02-06 23:09:02 +0100 |
commit | a8cb2d03dde2de7934a02b4ef8a8be7f56c01720 (patch) | |
tree | bb925e2783e79416553b878e2309aeee1e0135d5 | |
parent | 82ac34581e8fae6ef3f84758361c75f5b30c576d (diff) |
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>
-rw-r--r-- | utils.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1229,7 +1229,8 @@ scan_again: fd = open(fullpath, O_RDONLY); if (fd < 0) { - fprintf(stderr, "failed to read %s\n", fullpath); + fprintf(stderr, "failed to open %s: %s\n", + fullpath, strerror(errno)); continue; } ret = btrfs_scan_one_device(fd, fullpath, &tmp_devices, |