btrfs-progs: open RW to register device using btrfs-control

We are passing device path to be registered with in kernel,
so we need to open with RW

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
master
Anand Jain 2014-10-15 08:46:54 +08:00 committed by David Sterba
parent 38cfeef103
commit bdac35cea2
1 changed files with 1 additions and 1 deletions

View File

@ -1246,7 +1246,7 @@ void btrfs_register_one_device(char *fname)
int ret;
int e;
fd = open("/dev/btrfs-control", O_RDONLY);
fd = open("/dev/btrfs-control", O_RDWR);
if (fd < 0) {
fprintf(stderr, "failed to open /dev/btrfs-control "
"skipping device registration: %s\n",