linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] btrfs-progs: print errno string when /dev/btrfs-control open fails
@ 2013-03-14  3:17 Anand Jain
  2013-03-14 22:41 ` David Sterba
  0 siblings, 1 reply; 3+ messages in thread
From: Anand Jain @ 2013-03-14  3:17 UTC (permalink / raw)
  To: linux-btrfs

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>
---
 utils.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/utils.c b/utils.c
index c29861b..17c6553 100644
--- a/utils.c
+++ b/utils.c
@@ -938,7 +938,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");
+			"%s, skipping device registration\n",
+			strerror(errno));
 		return;
 	}
 	strncpy(args.name, fname, BTRFS_PATH_NAME_MAX);
-- 
1.8.1.227.g44fe835


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-03-15  1:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-14  3:17 [PATCH] btrfs-progs: print errno string when /dev/btrfs-control open fails Anand Jain
2013-03-14 22:41 ` David Sterba
2013-03-15  1:37   ` Anand Jain

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).