Fix misleading error message in btrfsctl
This updates Peter Klotz's original patch to use perror instead of fprintf when it fails to open /dev/btrfs-control
This commit is contained in:
parent
16b04fb5f5
commit
901314f070
|
@ -189,6 +189,10 @@ int main(int ac, char **av)
|
|||
|
||||
if (command == BTRFS_IOC_SCAN_DEV) {
|
||||
fd = open("/dev/btrfs-control", O_RDWR);
|
||||
if (fd < 0) {
|
||||
perror("failed to open /dev/btrfs-control");
|
||||
exit(1);
|
||||
}
|
||||
name = fname;
|
||||
} else {
|
||||
fd = open_file_or_dir(fname);
|
||||
|
|
Loading…
Reference in a new issue