From: Pierre-Alexandre Meyer Date: Sun, 22 Mar 2009 03:29:49 +0000 (-0700) Subject: hdt: Add default callback for the DMI show module X-Git-Tag: syslinux-3.80-pre1~75 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e0398422e4bbc8efac5628b18e69c5a55be54946;p=profile%2Fivi%2Fsyslinux.git hdt: Add default callback for the DMI show module Impact: Extend the cli. `show' in the dmi mode now lists the available modules. Misc.: remove noisy printf. Signed-off-by: Pierre-Alexandre Meyer --- diff --git a/com32/hdt/hdt-cli-dmi.c b/com32/hdt/hdt-cli-dmi.c index 5025bd3..0cd1bc3 100644 --- a/com32/hdt/hdt-cli-dmi.c +++ b/com32/hdt/hdt-cli-dmi.c @@ -450,8 +450,9 @@ struct cli_callback_descr list_dmi_show_modules[] = { }; struct cli_module_descr dmi_show_modules = { - .modules = list_dmi_show_modules, - .nb_modules = CLI_DMI_MAX_MODULES, + .modules = list_dmi_show_modules, + .nb_modules = CLI_DMI_MAX_MODULES, + .default_callback = main_show_dmi, }; struct cli_mode_descr dmi_mode = { diff --git a/com32/hdt/hdt-cli.c b/com32/hdt/hdt-cli.c index a35eed2..06c6a5b 100644 --- a/com32/hdt/hdt-cli.c +++ b/com32/hdt/hdt-cli.c @@ -306,13 +306,11 @@ static void exec_command(char *line, } else { find_cli_callback_descr(command, hdt_mode.default_modules, - ¤t_module); + ¤t_module); if (current_module != NULL) { current_module->exec(argc, argv, hardware); return; } - - printf("Command '%s' incorrect. See `help'.\n", command); } }