chiark / gitweb /
fstab-generator: set "ro" as default for sysroot.mount
[elogind.git] / src / fstab-generator / fstab-generator.c
index af7276daa7c82212bfedab875b8924641f122542..5c34de1155f90dccd60fe005b9c19098226f1dbe 100644 (file)
@@ -449,8 +449,9 @@ static int parse_new_root_from_proc_cmdline(void) {
                 return 0;
         }
 
                 return 0;
         }
 
+        opts = strdup("ro");
         type = strdup("auto");
         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.
                 return log_oom();
 
         /* root= and roofstype= may occur more than once, the last instance should take precedence.