richardphibel / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
9fc0f6
From 42f30a9750ca939f1e805d5fb7790cd8dd3dee62 Mon Sep 17 00:00:00 2001
9fc0f6
From: =?UTF-8?q?Thomas=20B=C3=A4chler?= <thomas@archlinux.org>
9fc0f6
Date: Mon, 30 Sep 2013 00:32:33 +0200
9fc0f6
Subject: [PATCH] fstab-generator: When parsing the root= cmdline option, set
9fc0f6
 FsckPassNo to 1
9fc0f6
9fc0f6
[tomegun: without this we would never fsck the rootfs if it was directly
9fc0f6
mounted 'rw' from the initrd. We now risk fsck'ing it twice in the case it
9fc0f6
is mounted 'ro', so that should be addressed in a separate patch.]
9fc0f6
---
9fc0f6
 src/fstab-generator/fstab-generator.c | 2 +-
9fc0f6
 1 file changed, 1 insertion(+), 1 deletion(-)
9fc0f6
9fc0f6
diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c
9fc0f6
index 9efccb9..6cecb4e 100644
9fc0f6
--- a/src/fstab-generator/fstab-generator.c
9fc0f6
+++ b/src/fstab-generator/fstab-generator.c
9fc0f6
@@ -449,7 +449,7 @@ static int parse_new_root_from_proc_cmdline(void) {
9fc0f6
         }
9fc0f6
 
9fc0f6
         log_debug("Found entry what=%s where=/sysroot type=%s", what, type);
9fc0f6
-        r = add_mount(what, "/sysroot", type, opts, 0, noauto, nofail, false,
9fc0f6
+        r = add_mount(what, "/sysroot", type, opts, 1, noauto, nofail, false,
9fc0f6
                       SPECIAL_INITRD_ROOT_FS_TARGET, "/proc/cmdline");
9fc0f6
 
9fc0f6
         return (r < 0) ? r : 0;