]> www.infradead.org Git - mtd-utils.git/commitdiff
fs-tests: also preserve mount options when mounting again
authorAdrian Hunter <ext-adrian.hunter@nokia.com>
Mon, 8 Sep 2008 08:39:29 +0000 (11:39 +0300)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Mon, 8 Sep 2008 10:15:02 +0000 (13:15 +0300)
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
tests/fs-tests/lib/tests.c

index 570672f706beee19416976d925e31c4f4e09570f..68b42e4829ab3c4a1d260b4b6f8456d27a2072cf 100644 (file)
@@ -1035,7 +1035,13 @@ static void tests_mnt(int mnt)
                target = tests_file_system_mount_dir;
                filesystemtype = tests_file_system_type;
                mountflags = 0;
-               data = NULL;
+               data = mount_info.mnt_opts;
+               if (data) {
+                       if (strcmp(data, "rw") == 0)
+                               data = NULL;
+                       else if (strncmp(data, "rw,", 3) == 0)
+                               data += 3;
+               }
                CHECK(mount(source, target, filesystemtype, mountflags, data)
                        != -1);
                CHECK(chdir(cwd) != -1);