chiark / gitweb /
Revert "mount: order options before other arguments to mount"
authorLennart Poettering <lennart@poettering.net>
Thu, 2 Oct 2014 19:02:03 +0000 (21:02 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 2 Oct 2014 19:02:03 +0000 (21:02 +0200)
This reverts commit 141a1ceaa62578f1ed14f04cae2113dd0f49fd7f.

People should fix their libc's getopt(), instead of us using a weird
option ordering...

src/core/mount.c

index f3ec736..e284357 100644 (file)
@@ -903,10 +903,10 @@ static void mount_enter_mounting(Mount *m) {
                                 m->control_command,
                                 "/bin/mount",
                                 m->sloppy_options ? "-ns" : "-n",
-                                "-t", m->parameters_fragment.fstype ? m->parameters_fragment.fstype : "auto",
-                                "-o", m->parameters_fragment.options ? m->parameters_fragment.options : "",
                                 m->parameters_fragment.what,
                                 m->where,
+                                "-t", m->parameters_fragment.fstype ? m->parameters_fragment.fstype : "auto",
+                                m->parameters_fragment.options ? "-o" : NULL, m->parameters_fragment.options,
                                 NULL);
         else
                 r = -ENOENT;
@@ -951,10 +951,10 @@ static void mount_enter_remounting(Mount *m) {
                                 m->control_command,
                                 "/bin/mount",
                                 m->sloppy_options ? "-ns" : "-n",
-                                "-t", m->parameters_fragment.fstype ? m->parameters_fragment.fstype : "auto",
-                                "-o", o,
                                 m->parameters_fragment.what,
                                 m->where,
+                                "-t", m->parameters_fragment.fstype ? m->parameters_fragment.fstype : "auto",
+                                "-o", o,
                                 NULL);
         } else
                 r = -ENOENT;