From: Thomas Bächler Date: Sun, 29 Sep 2013 22:32:33 +0000 (+0200) Subject: fstab-generator: When parsing the root= cmdline option, set FsckPassNo to 1 X-Git-Tag: v209~1833 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=7f5806d7095a197e4788a7803642831beec295bf fstab-generator: When parsing the root= cmdline option, set FsckPassNo to 1 [tomegun: without this we would never fsck the rootfs if it was directly mounted 'rw' from the initrd. We now risk fsck'ing it twice in the case it is mounted 'ro', so that should be addressed in a separate patch.] --- diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c index 9e7d55d17..a7536f8f7 100644 --- a/src/fstab-generator/fstab-generator.c +++ b/src/fstab-generator/fstab-generator.c @@ -442,7 +442,7 @@ static int parse_new_root_from_proc_cmdline(void) { } log_debug("Found entry what=%s where=/sysroot type=%s", what, type); - r = add_mount(what, "/sysroot", type, opts, 0, noauto, nofail, false, + r = add_mount(what, "/sysroot", type, opts, 1, noauto, nofail, false, SPECIAL_INITRD_ROOT_FS_TARGET, "/proc/cmdline"); return (r < 0) ? r : 0;