ldlinux: Always update ConfigName when opening a config file
commit5447ef821c24b526079ef785d2454ed0efff3e2b
authorMatt Fleming <matt.fleming@intel.com>
Thu, 28 Feb 2013 17:44:54 +0000 (28 17:44 +0000)
committerMatt Fleming <matt.fleming@intel.com>
Thu, 7 Mar 2013 12:17:26 +0000 (7 12:17 +0000)
tree0d72418129dc18449ae26c6f1758aa8a7df9d927
parent4153b9005c460e02d36c457367a045444812bb97
ldlinux: Always update ConfigName when opening a config file

With the introduction of commit aa7dd29db684 ("ldlinux: Pass config
filename as argv[1] to ldlinux.c32") we stopped using ConfigName to
store the filename of the config file we intend to open in execute()
since it interfered with the filesystem-specific open_config()
implementations. But a side-effect of this change is that
syslinux_config_file() no longer works if we explicitly pass a
filename to parse_config_file().

The logical place to keep ConfigName in sync is in parse_config_file()
since it's expected that all the filesystem-specific open_config()
functions will fill out ConfigName for us. In the case where the
filename is supplied by the caller, we need to fill it out ourselves.

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
com32/elflink/ldlinux/readconfig.c