pass rootOptions config as rootflags= kernel cmdline opt
This commit is contained in:
@@ -95,7 +95,7 @@ int main()
|
||||
};
|
||||
char *buf;
|
||||
|
||||
// finds root= rootfstype= rootopts= options
|
||||
// finds root= rootfstype= rootflags= options
|
||||
buf = strdup("liminix console=ttyS0,115200 panic=10 oops=panic init=/bin/init loglevel=8 root=/dev/ubi0_4 rootfstype=ubifs rootflags=subvol=1 fw_devlink=off mtdparts=phram0:18M(rootfs) phram.phram=phram0,0x40400000,18874368,65536 root=/dev/mtdblock0 foo");
|
||||
memset(&opts, '\0', sizeof opts); parseopts(buf, &opts);
|
||||
expect_equal(opts.device, "/dev/mtdblock0");
|
||||
@@ -115,6 +115,13 @@ int main()
|
||||
expect_equal(opts.device, "/dev/hda1");
|
||||
expect_equal(opts.fstype, "ubifs");
|
||||
|
||||
// works when rootflags is the last option
|
||||
buf = strdup("liminix fw_devlink=off root=/dev/hda1 rootfstype=ubifs rootflags=subvol=@");
|
||||
memset(&opts, '\0', sizeof opts); parseopts(buf, &opts);
|
||||
expect_equal(opts.device, "/dev/hda1");
|
||||
expect_equal(opts.fstype, "ubifs");
|
||||
expect_equal(opts.mount_opts, "subvol=@");
|
||||
|
||||
buf = strdup("liminix rootfstype=ubifs fw_devlink=off root=/dev/hda1 foo");
|
||||
memset(&opts, '\0', sizeof opts); parseopts(buf, &opts);
|
||||
expect_equal(opts.fstype, "ubifs");
|
||||
|
@@ -85,7 +85,7 @@ int main(int argc, char *argv[], char *envp[])
|
||||
write(1, " (", 2);
|
||||
write(1, opts.fstype, strlen(opts.fstype));
|
||||
if(opts.mount_opts) {
|
||||
write(1, ", opts=", 6);
|
||||
write(1, ", opts=", 7);
|
||||
write(1, opts.mount_opts, strlen(opts.mount_opts));
|
||||
}
|
||||
write(1, ")\n", 2);
|
||||
|
Reference in New Issue
Block a user