[syslinux] [PATCH 2/9] ldlinux: Print a warning if no config file is found
Shao Miller
sha0.miller at gmail.com
Fri Nov 2 22:00:04 PDT 2012
On 11/2/2012 10:13, Matt Fleming wrote:
> From: Matt Fleming <matt.fleming at intel.com>
>
> This behaviour is taken from 4.06, where an error message is printed
> if no config file is found. A warning is a more user-friendly choice
> since Syslinux will still function without a config file.
>
> Signed-off-by: Matt Fleming <matt.fleming at intel.com>
> ---
> com32/elflink/ldlinux/readconfig.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/com32/elflink/ldlinux/readconfig.c b/com32/elflink/ldlinux/readconfig.c
> index 1db397a..2fa0641 100644
> --- a/com32/elflink/ldlinux/readconfig.c
> +++ b/com32/elflink/ldlinux/readconfig.c
> @@ -1420,7 +1420,10 @@ void parse_configs(char **argv)
> current_menu = root_menu;
>
> if (!argv || !*argv) {
> - parse_one_config(NULL);
> + if (parse_one_config(NULL) < 0) {
> + printf("WARNING: No configuration file found\n");
> + return;
> + }
> } else {
> while ((filename = *argv++)) {
> dprintf("Parsing config: %s", filename);
>
Except for PXELINUX, where it might be best as "ERROR". Gene Cumm
suggested something like:
printf("%s: No configuration file found\n", is_pxelinux ? "ERROR" :
"WARNING");
- Shao Miller
More information about the Syslinux
mailing list