From dabd2835836cd77c765e3f500c349ffe126f458c Mon Sep 17 00:00:00 2001 From: Tsutomu Itoh Date: Thu, 9 Jun 2016 10:23:15 +0900 Subject: 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 Signed-off-by: David Sterba --- volumes.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'volumes.c') diff --git a/volumes.c b/volumes.c index ccfa732e..b42a4126 100644 --- a/volumes.c +++ b/volumes.c @@ -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; } -- cgit v1.2.3