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>
fd = open(device->name, flags);
if (fd < 0) {
ret = -errno;
+ error("cannot open device '%s': %s", device->name,
+ strerror(errno));
goto fail;
}