chiark / gitweb /
fstab-generator: drop rootwait support
authorTom Gundersen <teg@jklm.no>
Fri, 1 Mar 2013 20:15:51 +0000 (21:15 +0100)
committerTom Gundersen <teg@jklm.no>
Fri, 1 Mar 2013 20:17:19 +0000 (21:17 +0100)
I originally added this to stay as compatible as possible with the kernel, but
as Lennart argued it is not really useful in the initramfs, so let's drop it (we
already don't support 'rootdealy').

TODO
src/fstab-generator/fstab-generator.c

diff --git a/TODO b/TODO
index 17b508149eeb2b920c91bb519aa537b6f1c205f9..168913beb082289d3e7d48ec6665030e9a68ab34 100644 (file)
--- a/TODO
+++ b/TODO
@@ -49,8 +49,6 @@ Fedora 19:
 
 Features:
 
-* remove "rootwait" support from fstab generator
-
 * rework specifier logic so that we can distuingish OOM errors from other errors
 
 * systemd-inhibit: refuse taking delay locks
index 5c34de1155f90dccd60fe005b9c19098226f1dbe..23a8d7981314926e2d657ea164fbbf2ee6feab21 100644 (file)
@@ -192,7 +192,7 @@ static bool mount_is_network(struct mntent *me) {
 }
 
 static int add_mount(const char *what, const char *where, const char *type, const char *opts,
-                     int passno, bool wait, bool noauto, bool nofail, bool automount, bool isbind, bool isnetwork,
+                     int passno, bool noauto, bool nofail, bool automount, bool isbind, bool isnetwork,
                      const char *source) {
         char _cleanup_free_
                 *name = NULL, *unit = NULL, *lnk = NULL, *device = NULL,
@@ -284,10 +284,6 @@ static int add_mount(const char *what, const char *where, const char *type, cons
                         "Options=%s\n",
                         opts);
 
-        if (wait)
-                fprintf(f,
-                        "TimeoutSec=0\n");
-
         fflush(f);
         if (ferror(f)) {
                 log_error("Failed to write unit file %s: %m", unit);
@@ -422,9 +418,8 @@ static int parse_fstab(void) {
                         isnetwork = mount_is_network(me);
 
                         k = add_mount(what, where, me->mnt_type, me->mnt_opts,
-                                     me->mnt_passno, false, noauto, nofail,
-                                     automount, isbind, isnetwork,
-                                     "/etc/fstab");
+                                     me->mnt_passno, noauto, nofail, automount,
+                                     isbind, isnetwork, "/etc/fstab");
                 }
 
                 if (k < 0)
@@ -441,7 +436,6 @@ static int parse_new_root_from_proc_cmdline(void) {
         _cleanup_free_ char *what = NULL, *type = NULL, *opts = NULL, *line = NULL;
         int r;
         size_t l;
-        bool wait = false;
 
         r = read_one_line_file("/proc/cmdline", &line);
         if (r < 0) {
@@ -489,8 +483,7 @@ static int parse_new_root_from_proc_cmdline(void) {
                         if (!opts)
                                 return log_oom();
 
-                } else if (streq(word, "rootwait"))
-                        wait = true;
+                }
 
                 free(word);
         }
@@ -498,8 +491,8 @@ static int parse_new_root_from_proc_cmdline(void) {
         if (what) {
 
                 log_debug("Found entry what=%s where=/sysroot type=%s", what, type);
-                r = add_mount(what, "/sysroot", type, opts, 0, wait, false, false,
-                              false, false, false, "/proc/cmdline");
+                r = add_mount(what, "/sysroot", type, opts, 0, false, false, false,
+                              false, false, "/proc/cmdline");
 
                 if (r < 0)
                         return r;