From: Nathan Scott Date: Sun, 3 Feb 2002 04:29:50 +0000 (+0000) Subject: xfs_repair in no-modify mode opens the filesystem device read-only now X-Git-Tag: v2.0.0~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e214ae4154f84bfd6e8fc9e68a3d76e21d16b415;p=thirdparty%2Fxfsprogs-dev.git xfs_repair in no-modify mode opens the filesystem device read-only now (fix from Chris Pascoe). --- 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); }