From fecc8c382b2b1e7ee567657785480da33e23f997 Mon Sep 17 00:00:00 2001 From: Adrian Hunter Date: Mon, 8 Sep 2008 11:39:29 +0300 Subject: fs-tests: also preserve mount options when mounting again Signed-off-by: Adrian Hunter Signed-off-by: Artem Bityutskiy --- tests/fs-tests/lib/tests.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tests/fs-tests/lib') diff --git a/tests/fs-tests/lib/tests.c b/tests/fs-tests/lib/tests.c index 570672f..68b42e4 100644 --- a/tests/fs-tests/lib/tests.c +++ b/tests/fs-tests/lib/tests.c @@ -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); -- cgit v1.2.3