[systemd-devel] [PATCH] remount-fs: pass fstab options to mount
richard.maw at codethink.co.uk
richard.maw at codethink.co.uk
Mon Jun 25 05:56:17 PDT 2012
From: Richard Maw <richard.maw at codethink.co.uk>
busybox's mount implementation doesn't re-read the options from
the fstab, it uses the flags it has in mtab.
This makes `mount -o remount $device` a no-op.
Rather than do string concatenation, add another -o option to the
list of parameters, since -o is cumulative.
---
src/remount-fs/remount-fs.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/remount-fs/remount-fs.c b/src/remount-fs/remount-fs.c
index ef68e50..56b51ae 100644
--- a/src/remount-fs/remount-fs.c
+++ b/src/remount-fs/remount-fs.c
@@ -94,14 +94,16 @@ int main(int argc, char *argv[]) {
}
if (pid == 0) {
- const char *arguments[5];
+ const char *arguments[7];
/* Child */
arguments[0] = "/bin/mount";
arguments[1] = me->mnt_dir;
arguments[2] = "-o";
arguments[3] = "remount";
- arguments[4] = NULL;
+ arguments[4] = "-o";
+ arguments[5] = me->mnt_opts;
+ arguments[6] = NULL;
execv("/bin/mount", (char **) arguments);
--
1.7.5.4
More information about the systemd-devel
mailing list