ldlinux: Pass config filename as argv[1] to ldlinux.c32
commitaa7dd29db684d73f044b520e8c148f7ddb8c38d5
authorMatt Fleming <matt.fleming@intel.com>
Tue, 19 Feb 2013 21:11:55 +0000 (19 21:11 +0000)
committerMatt Fleming <matt.fleming@intel.com>
Wed, 20 Feb 2013 10:13:10 +0000 (20 10:13 +0000)
tree0a50358fc068f075adc56fcfb42c553f9d02f9ad
parent69c09a88f6c46ff139cd5c0316d3eeae508e2b5c
ldlinux: Pass config filename as argv[1] to ldlinux.c32

Instead of hijacking ConfigName use a more standard method of passing
a config name to ldlinux.c32's main() function, via argc and argv.

This allows us to actually call open_config() the first time
ldlinux.c32 is executed even if the file system has already modified
ConfigName. For example, pxelinux_configfile() parses the DHCP 209
option and fills out ConfigName before ldlinux.c32 is launched, but
because the PXE code needs to do things with the path to the config
file (such as parsing the DHCP 210 option), we need to leave the
config mangling to open_config() and not try and lookup ConfigName
from ldlinux.

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
com32/elflink/ldlinux/execute.c
com32/elflink/ldlinux/ldlinux.c
core/elflink/load_env32.c
core/include/core.h