From e214ae4154f84bfd6e8fc9e68a3d76e21d16b415 Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Sun, 3 Feb 2002 04:29:50 +0000 Subject: [PATCH] xfs_repair in no-modify mode opens the filesystem device read-only now (fix from Chris Pascoe). --- repair/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repair/io.c b/repair/io.c index 35de4d870..e12b7bae9 100644 --- a/repair/io.c +++ b/repair/io.c @@ -45,7 +45,7 @@ io_init(void) ASSERT(fs_name != NULL && *fs_name != '\0'); - if ((fs_fd = open (fs_name, O_RDWR)) < 0) { + if ((fs_fd = open (fs_name, (no_modify? O_RDONLY : O_RDWR))) < 0) { do_error("couldn't open filesystem \"%s\"\n", fs_name); } -- 2.47.2