log system() exit status when it is non zero to avoid warnings and to inform people

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1697 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Mike Frysinger 15 years ago
parent e044a7bcd1
commit 1310dca184

@ -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 <jie.zhang@analog.com>
* src/apps/jtag/jtag.c (main): Don't trigger open file error

@ -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;
}

Loading…
Cancel
Save