From aa4e83406a539e64083ad61e1c80cfefc2f46086 Mon Sep 17 00:00:00 2001 From: James Hughes Date: Fri, 11 Jan 2019 15:35:36 +0000 Subject: [PATCH] Update vcdbg help The help text is now clearer. When using vcdbg help , prevent the command name itself being displayed twice. Fixes https://github.com/raspberrypi/firmware/issues/594 --- interface/vcos/generic/vcos_cmd.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/interface/vcos/generic/vcos_cmd.c b/interface/vcos/generic/vcos_cmd.c index 3dfbdb346..953923a64 100644 --- a/interface/vcos/generic/vcos_cmd.c +++ b/interface/vcos/generic/vcos_cmd.c @@ -390,13 +390,14 @@ static VCOS_STATUS_T help_cmd( VCOS_CMD_PARAM_T *param ) * currently running */ - param->cmd_entry = found_entry; - param->argv[0] = param->argv[1]; - param->argv++; - param->argc--; - - vcos_cmd_usage( param ); - return VCOS_SUCCESS; + vcos_cmd_printf( param, "Usage: " ); + print_argument_prefix( param ); + vcos_cmd_printf( param, "%s %s - %s\n", + param->argv[1], + found_entry->args, + found_entry->descr ); + + return VCOS_SUCCESS; } vcos_cmd_error( param, "- unrecognized command: '%s'", param->argv[1] );