From 3ab9b9e7af305169e3c60496b02902c79c2881c4 Mon Sep 17 00:00:00 2001 From: Adrian Hunter Date: Thu, 5 Jun 2008 14:11:29 +0300 Subject: fs-tests: preserve mount options when mounting again Signed-off-by: Adrian Hunter --- tests/fs-tests/lib/tests.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/fs-tests/lib/tests.c b/tests/fs-tests/lib/tests.c index aaf3907..97e5207 100644 --- a/tests/fs-tests/lib/tests.c +++ b/tests/fs-tests/lib/tests.c @@ -995,7 +995,13 @@ void tests_remount(void) 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); -- cgit v1.2.3