Skip to content

Commit

Permalink
btrfs-progs: print errno string when /dev/btrfs-control open fails
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David Sterba <[email protected]>
  • Loading branch information
asj authored and kdave committed Mar 14, 2013
1 parent b14d06d commit 44a33d0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 44a33d0

Please sign in to comment.