diff options
author | Matt Fleming <matt.fleming@intel.com> | 2012-07-03 09:34:03 +0100 |
---|---|---|
committer | Matt Fleming <matt.fleming@intel.com> | 2012-07-03 09:44:35 +0100 |
commit | 316f9636e3958ada609d506deca8db3aef395e54 (patch) | |
tree | 1aaf9bb9a89b2a9cfdbb77aa526b92bac258bf7a /com32/menu | |
parent | 5f17528b5ff4e35911794d20759f5a72f0f4f3bd (diff) | |
download | syslinux-316f9636e3958ada609d506deca8db3aef395e54.tar.gz |
menu: Supply the command type to execute()
The old execute() was much more forgiving when passing a COM32 module
as KT_NONE, as the old code for loading a kernel could also handle
COM32 modules. This isn't the case with new_linux_kernel(), and COM32
modules really need to take the create_args_and_load() path in
execute().
Without this change loading .c32 files from vesamenu.c32/menu.c32
fails.
Reported-by: Helmut Hullen <Hullen@t-online.de>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'com32/menu')
-rw-r--r-- | com32/menu/menumain.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/com32/menu/menumain.c b/com32/menu/menumain.c index a795cb2c..53bc6c64 100644 --- a/com32/menu/menumain.c +++ b/com32/menu/menumain.c @@ -1161,9 +1161,13 @@ int main(int argc, char *argv[]) printf("\033[?25h\033[%d;1H\033[0m", cursorrow); if (cmdline) { - execute(cmdline, KT_NONE); - if (cm->onerror) - execute(cm->onerror, KT_NONE); + enum kernel_type type = parse_kernel_type(cmdline); + + execute(cmdline, type); + if (cm->onerror) { + type = parse_kernel_type(cm->onerror); + execute(cm->onerror, type); + } } else { return 0; /* Exit */ } |