summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnand Jain <anand.jain@oracle.com>2013-03-14 11:17:19 +0800
committerDavid Sterba <dsterba@suse.cz>2013-03-14 23:43:04 +0100
commit44a33d0d14856a6c8c309c98e3223adaca452a30 (patch)
treed0d2aae5f7eca2d4e56c06ac404793267dbc0293
parentb14d06ddb94cd750ce26063bebd17772590331de (diff)
btrfs-progs: print errno string when /dev/btrfs-control open fails
Of recently and intermittently I am seeing open fail for /dev/btrfs-control (btrfs is loaded), and there are no dmesg errors, this may not be a complete help in digging this issue but something which is necessary. Thanks Signed-off-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.cz>
-rw-r--r--utils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/utils.c b/utils.c
index cfb6116d..7b028a79 100644
--- a/utils.c
+++ b/utils.c
@@ -1024,7 +1024,8 @@ void btrfs_register_one_device(char *fname)
fd = open("/dev/btrfs-control", O_RDONLY);
if (fd < 0) {
fprintf(stderr, "failed to open /dev/btrfs-control "
- "skipping device registration\n");
+ "skipping device registration: %s\n",
+ strerror(errno));
return;
}
strncpy(args.name, fname, BTRFS_PATH_NAME_MAX);