diff options
author | Tsutomu Itoh <t-itoh@jp.fujitsu.com> | 2016-06-09 10:23:15 +0900 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-07-13 18:44:52 +0200 |
commit | dabd2835836cd77c765e3f500c349ffe126f458c (patch) | |
tree | 64238efb69801699f242c77838444b894bf5280d /volumes.c | |
parent | e67219255cca7b8e09789b6ca725fc4e9780da73 (diff) |
btrfs-progs: add the error message when open fails
When open in btrfs_open_devices failed, only the following message is
displayed. Therefore the user doesn't understand the reason why open
failed.
# btrfs check /dev/sdb8
Couldn't open file system
This patch adds the error message when open fails.
Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'volumes.c')
-rw-r--r-- | volumes.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -227,6 +227,8 @@ int btrfs_open_devices(struct btrfs_fs_devices *fs_devices, int flags) fd = open(device->name, flags); if (fd < 0) { ret = -errno; + error("cannot open device '%s': %s", device->name, + strerror(errno)); goto fail; } |