fix elilo invocations from the boot manager
PATCH 1/1 fix elilo invocations from the boot manager
In some odd cases, when the boot manager invokes elilo, argc is 0, while Optind is initialized to 1. If we continue with prompting disabled, strange things can happen. (usually, attempts to boot a non-existant kernel.)
Bill
elilo.c +1 -1
@@ -373,7 +381,7 @@* if user specified a kernel name or label, then ignore * forced interactive mode */ -if (argv[Optind]) elilo_opt.prompt =0 ; +if (argv[Optind] && Optind <= argc) elilo_opt.prompt =0 ;/* * which chooser we will use
Bill,
Quoted 5 lines · Bill Nottingham
In some odd cases, when the boot manager invokes elilo, argc is 0, while Optind is initialized to 1. If we continue with prompting disabled, strange things can happen. (usually, attempts to boot a non-existant kernel.)
Thanks for your patch. This comes from the fact that the parameters passed by the caller are in a weird state and confuse the function that converts them into argc/argv form. I have noticed the same thing when booting from the network and that's why I introduce the fixupargs() stage in the main routine.
Signature · 1 line
-Stephane