diff options
Diffstat (limited to 'com32/gfxboot/gfxboot.c')
-rw-r--r-- | com32/gfxboot/gfxboot.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/com32/gfxboot/gfxboot.c b/com32/gfxboot/gfxboot.c index e1b865a1..3937e305 100644 --- a/com32/gfxboot/gfxboot.c +++ b/com32/gfxboot/gfxboot.c @@ -424,7 +424,7 @@ unsigned magic_ok(unsigned char *buf, unsigned *code_size) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// Search cpio archive for gfx file. +// Search (cpio archive) for gfx file. // unsigned find_file(unsigned char *buf, unsigned len, unsigned *gfx_file_start, unsigned *file_len, unsigned *code_size) { @@ -433,6 +433,8 @@ unsigned find_file(unsigned char *buf, unsigned len, unsigned *gfx_file_start, u *gfx_file_start = 0; *code_size = 0; + if((code_start = magic_ok(buf, code_size))) return code_start; + for(i = 0; i < len;) { if((len - i) >= 0x1a && (buf[i] + (buf[i + 1] << 8)) == 0x71c7) { fname_len = *(unsigned short *) (buf + i + 20); @@ -730,7 +732,12 @@ void boot_entry(menu_t *menu_ptr, char *arg) file = menu_ptr->kernel; if(!file) file = menu_ptr->linux; - if(!file) return; + if(!file) { + gfx_done(); + asprintf(&cmd_buf, "%s %s", menu_ptr->label, arg); + syslinux_run_command(cmd_buf); + return; + } // first, load kernel |