summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2021-06-02 16:54:12 +0200
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2021-06-02 16:54:15 +0200
commit88d426f440716f57bb9f60459514db52fd06dcac (patch)
tree2cc9b206a19ae5b48191f0c707bfaa2959aa69d4
parentb892f84c0a3b1fa8ffd6382e02a37d80e0d9af92 (diff)
downloadexynos-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.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests.c b/tests.c
index 955d8f3..a5990bd 100644
--- a/tests.c
+++ b/tests.c
@@ -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) {