chiark / gitweb /
fstab-generator: set "ro" as default for sysroot.mount
authorHarald Hoyer <harald@redhat.com>
Fri, 1 Mar 2013 16:49:06 +0000 (17:49 +0100)
committerHarald Hoyer <harald@redhat.com>
Fri, 1 Mar 2013 16:52:05 +0000 (17:52 +0100)
src/fstab-generator/fstab-generator.c

index af7276d..5c34de1 100644 (file)
@@ -449,8 +449,9 @@ static int parse_new_root_from_proc_cmdline(void) {
                 return 0;
         }
 
+        opts = strdup("ro");
         type = strdup("auto");
-        if (!type)
+        if (!opts || !type)
                 return log_oom();
 
         /* root= and roofstype= may occur more than once, the last instance should take precedence.