Anand Jain
2014-Oct-15 00:46 UTC
[PATCH 1/1] 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> --- utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils.c b/utils.c index dd4ee52..78cb93f 100644 --- a/utils.c +++ b/utils.c @@ -1243,7 +1243,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", -- 2.0.0.153.g79dcccc -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html