summaryrefslogtreecommitdiff
path: root/utils.c
diff options
context:
space:
mode:
authorAnand Jain <anand.jain@oracle.com>2014-10-15 08:46:54 +0800
committerDavid Sterba <dsterba@suse.cz>2014-10-16 12:08:59 +0200
commitbdac35cea24d11d3bcb6682038f907ba05484525 (patch)
tree66e41f8711c8fd3f6e55071ee9e18137c7e10b41 /utils.c
parent38cfeef1033e254c0a1446fe6f4bbe6f30e1f5db (diff)
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>
Diffstat (limited to 'utils.c')
-rw-r--r--utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils.c b/utils.c
index e86292ac..b65eef70 100644
--- a/utils.c
+++ b/utils.c
@@ -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",