gfxboot: handle INITRD config line
authorSteffen Winterfeldt <snwint@suse.de>
Tue, 19 Apr 2011 13:27:26 +0000 (15:27 +0200)
committerSebastian Herbszt <herbszt@gmx.de>
Sun, 24 Apr 2011 13:31:16 +0000 (15:31 +0200)
Handle case where there is no initrd= option but a separate initrd config line.

Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
com32/gfxboot/gfxboot.c

index 3749920..9a39e79 100644 (file)
@@ -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) {