syslinux/syslinux-4.04-noinitrd.diff

22 lines
574 B
Diff
Raw Normal View History

diff --git a/com32/gfxboot/gfxboot.c b/com32/gfxboot/gfxboot.c
index 3749920..9a39e79 100644
--- a/com32/gfxboot/gfxboot.c
+++ b/com32/gfxboot/gfxboot.c
@@ -922,11 +922,15 @@ void boot_entry(menu_t *menu_ptr, char *arg)
*skip_nonspaces(s) = 0;
initrd_arg = s;
}
+ else if(initrd_arg) {
+ free(s0);
+ initrd_arg = s0 = strdup(initrd_arg);
+ }
if(initrd_arg) {
initrd = initramfs_init();
- while((t = strsep(&s, ","))) {
+ while((t = strsep(&initrd_arg, ","))) {
initrd_buf = load_one(t, &initrd_size);
if(!initrd_buf) {