This is an automated email from Gerrit. Antonio Borneo (borneo.anto...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/5221
-- gerrit commit 5ad7a2a540bd2cd7eb641af1b83d9876c772c1a3 Author: Antonio Borneo <borneo.anto...@gmail.com> Date: Thu Jun 6 23:05:36 2019 +0200 helper/command: print an errmsg on silently failing commands Some command return an error code on failure, but do not create a reasonable error message. This makes either difficult to detect the failure and to fix the incorrect command. Add a default error message in case of commands that fail but do not provide an error message. Change-Id: I7eb85b05e674329b6a160ccb5297fabe29dc0a44 Signed-off-by: Antonio Borneo <borneo.anto...@gmail.com> Reported-by: Christopher Head <ch...@zaber.com> diff --git a/src/helper/command.c b/src/helper/command.c index ab0654b..0687339 100644 --- a/src/helper/command.c +++ b/src/helper/command.c @@ -628,6 +628,9 @@ static int run_command(struct command_context *context, char *full_name = command_name(c, ' '); LOG_DEBUG("Command '%s' failed with error code %d", full_name ? full_name : c->name, retval); + if (Jim_Length(cmd.output) == 0) + command_print(&cmd, "Command '%s' failed with error code %d", + full_name ? full_name : c->name, retval); free(full_name); } /* Use the command output as the Tcl result */ -- _______________________________________________ OpenOCD-devel mailing list OpenOCD-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openocd-devel