Currently we don't respect noauto/nofail root mount options (from
rootflags kernel cmdline). We should map these two flags to the
corresponding boolean variable noauto and nofail when calling
add_mount().
char *w, *state;
int r;
size_t l;
char *w, *state;
int r;
size_t l;
r = read_one_line_file("/proc/cmdline", &line);
if (r < 0) {
r = read_one_line_file("/proc/cmdline", &line);
if (r < 0) {
+ noauto = !!strstr(opts, "noauto");
+ nofail = !!strstr(opts, "nofail");
+
if (!what) {
log_debug("Could not find a root= entry on the kernel commandline.");
return 0;
if (!what) {
log_debug("Could not find a root= entry on the kernel commandline.");
return 0;
}
log_debug("Found entry what=%s where=/sysroot type=%s", what, type);
}
log_debug("Found entry what=%s where=/sysroot type=%s", what, type);
- r = add_mount(what, "/sysroot", type, opts, 0, false, false, false,
+ r = add_mount(what, "/sysroot", type, opts, 0, noauto, nofail, false,
false, NULL, NULL, NULL, SPECIAL_INITRD_ROOT_FS_TARGET, "/proc/cmdline");
return (r < 0) ? r : 0;
false, NULL, NULL, NULL, SPECIAL_INITRD_ROOT_FS_TARGET, "/proc/cmdline");
return (r < 0) ? r : 0;