diff --git a/urjtag/ChangeLog b/urjtag/ChangeLog index 34f43dc8..5b78435c 100644 --- a/urjtag/ChangeLog +++ b/urjtag/ChangeLog @@ -6,6 +6,8 @@ * src/tap/cable/jlink.c (jlink_debug_buffer): Unify log lines to avoid printf format security warnings. + * src/cmd/cmd_shell.c (cmd_shell_run): Log non-zero shell exit status. + 2010-01-21 Jie Zhang * src/apps/jtag/jtag.c (main): Don't trigger open file error diff --git a/urjtag/src/cmd/cmd_shell.c b/urjtag/src/cmd/cmd_shell.c index e80b6816..d608702b 100644 --- a/urjtag/src/cmd/cmd_shell.c +++ b/urjtag/src/cmd/cmd_shell.c @@ -78,9 +78,12 @@ cmd_shell_run (urj_chain_t *chain, char *params[]) } urj_log (URJ_LOG_LEVEL_NORMAL, "Executing '%s'\n", shell_cmd); - system (shell_cmd); + i = system (shell_cmd); free (shell_cmd); + if (i) + urj_log (URJ_LOG_LEVEL_NORMAL, "shell returned %i\n", i); + return URJ_STATUS_OK; }