diff options
| author | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2021-06-02 16:54:12 +0200 |
|---|---|---|
| committer | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2021-06-02 16:54:15 +0200 |
| commit | 88d426f440716f57bb9f60459514db52fd06dcac (patch) | |
| tree | 2cc9b206a19ae5b48191f0c707bfaa2959aa69d4 | |
| parent | b892f84c0a3b1fa8ffd6382e02a37d80e0d9af92 (diff) | |
| download | exynos-gpio-tool-88d426f440716f57bb9f60459514db52fd06dcac.tar.gz exynos-gpio-tool-88d426f440716f57bb9f60459514db52fd06dcac.tar.bz2 exynos-gpio-tool-88d426f440716f57bb9f60459514db52fd06dcac.zip | |
run_command: handle better debug output
Without that we have the commands output that are printed as-is
without any way to understand where these prints come from.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
| -rw-r--r-- | tests.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -37,7 +37,11 @@ static int run_command(int debug, char *command) int rc; if (debug) { - return system(command); + printf("%s: running \"%s\"\n", __func__, command); + rc = system(command); + printf("%s: %s exited with result %d\n", __func__, command, rc); + + return rc; } else { rc = asprintf(&silent_command, "%s 1>/dev/null", command); if (rc == -1) { |
