[PATCH 1/1] btrfs-progs: open RW to register device using btrfs-control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux