chiark / gitweb /
mount: order options before other arguments to mount
authorEmil Renner Berthing <systemd@esmil.dk>
Thu, 18 Sep 2014 13:24:59 +0000 (15:24 +0200)
committerTom Gundersen <teg@jklm.no>
Thu, 18 Sep 2014 16:12:51 +0000 (18:12 +0200)
src/core/mount.c

index e284357..f3ec736 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",
-                                m->parameters_fragment.what,
-                                m->where,
                                 "-t", m->parameters_fragment.fstype ? m->parameters_fragment.fstype : "auto",
                                 "-o", o,
+                                m->parameters_fragment.what,
+                                m->where,
                                 NULL);
         } else
                 r = -ENOENT;