X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Ffstab-generator%2Ffstab-generator.c;h=23a8d7981314926e2d657ea164fbbf2ee6feab21;hp=d4470f4fb8b3f8b2f4afa6b25114d734d86b5fe4;hb=533740e16118147ca1c066d641654d975ab6e169;hpb=92094b75fb8629492cddab1677a29830a7d96811 diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c index d4470f4fb..23a8d7981 100644 --- a/src/fstab-generator/fstab-generator.c +++ b/src/fstab-generator/fstab-generator.c @@ -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) { @@ -449,6 +443,7 @@ static int parse_new_root_from_proc_cmdline(void) { return 0; } + opts = strdup("ro"); type = strdup("auto"); if (!opts || !type) return log_oom(); @@ -488,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); } @@ -497,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;