aboutsummaryrefslogtreecommitdiffstats
path: root/com32/modules/linux.c
diff options
context:
space:
mode:
authorShao Miller <sha0.miller@gmail.com>2012-10-25 03:58:07 -0400
committerShao Miller <sha0.miller@gmail.com>2012-11-03 01:07:37 -0400
commit66484b55fe52e1393b8c6b522ca8d18b898e18f3 (patch)
tree0c78b1f6b5334bae2ae0f1096c8b57ee27e8d4cc /com32/modules/linux.c
parent5d7c2cdf73c3d901637d8e9f0a612f2cd8624cd0 (diff)
downloadsyslinux-66484b55fe52e1393b8c6b522ca8d18b898e18f3.tar.gz
syslinux-66484b55fe52e1393b8c6b522ca8d18b898e18f3.tar.xz
syslinux-66484b55fe52e1393b8c6b522ca8d18b898e18f3.zip
linux.c32: Add new initrd+= option for multiple initrds
linux.c32 now processes the kernel's command-line for "initrd+=" options. Given "initrd+=foo", linux.c32 will concatenate the file "foo" to the initrds that it has already loaded due to the "initrd=" option. Given "initrd+=foo,bar", linux.c32 will concatenate both files "foo" and "bar" to the initrds that it has already loaded due to the "initrd=" option. That is, multiple filenames can be specified with comma separators. Given "initrd+=foo initrd+=bar", linux.c32 will concatenate both files "foo" and "bar" to the initrds that it has already loaded due to the "initrd=" option. That is, the "initrd+=" option can be specified multiple times. The position of any "initrd=" option relative to any "initrd+=" option is irrelevant. The "initrd=" option is always processed before all "initrd+=" options. PLEASE NOTE: It is important to note that there are NO SPACES involved in using the "initrd+=" option. "initrd += foo" will not work. Signed-off-by: Shao Miller <sha0.miller@gmail.com>
Diffstat (limited to 'com32/modules/linux.c')
-rw-r--r--com32/modules/linux.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/com32/modules/linux.c b/com32/modules/linux.c
index 3ff50076..11cdc18f 100644
--- a/com32/modules/linux.c
+++ b/com32/modules/linux.c
@@ -291,6 +291,14 @@ int main(int argc, char *argv[])
goto bail;
}
+ argl = argv;
+ while ((argl = find_arguments(argl, &arg, "initrd+="))) {
+ argl++;
+ if (process_initramfs_args(arg, initramfs, kernel_name, ldmode_raw,
+ opt_quiet))
+ goto bail;
+ }
+
/* Append the DHCP info */
if (opt_dhcpinfo &&
!pxe_get_cached_info(PXENV_PACKET_TYPE_DHCP_ACK, &dhcpdata, &dhcplen)) {