fstab-generator: only handle block devices with root= kernel command line parameter

skip s.th. like root=nfs:... root=iscsi:... root=nbd:...
This commit is contained in:
Harald Hoyer 2013-03-04 21:00:56 +01:00
parent 8330847e94
commit 135b5212d4
1 changed files with 13 additions and 10 deletions

View File

@ -530,18 +530,21 @@ static int parse_new_root_from_proc_cmdline(void) {
free(word);
}
if (what) {
log_debug("Found entry what=%s where=/sysroot type=%s", what, type);
r = add_mount(what, "/sysroot", type, opts, 0, false, false, false,
false, false, true, "/proc/cmdline");
if (r < 0)
return r;
} else
if (!what) {
log_error("Could not find a root= entry on the kernel commandline.");
return 0;
}
return 0;
if (what[0] != '/') {
log_debug("Skipping entry what=%s where=/sysroot type=%s", what, type);
return 0;
}
log_debug("Found entry what=%s where=/sysroot type=%s", what, type);
r = add_mount(what, "/sysroot", type, opts, 0, false, false, false,
false, false, true, "/proc/cmdline");
return (r < 0) ? r : 0;
}
static int parse_proc_cmdline(void) {