summaryrefslogtreecommitdiffstats
path: root/exec.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2020-06-02 15:39:19 -0400
committerTavian Barnes <tavianator@tavianator.com>2020-06-02 15:40:30 -0400
commita1c8bda52a9c07d32127762ee0c865660a0268ab (patch)
treec79a8a60573fa712c898ece6021929ab539e625e /exec.c
parentc074645660f58faee1f653e4e8bd1ebf832c21f1 (diff)
downloadbfs-a1c8bda52a9c07d32127762ee0c865660a0268ab.tar.xz
diag: Unify debug printing
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/exec.c b/exec.c
index 3c791d7..7c199a3 100644
--- a/exec.c
+++ b/exec.c
@@ -37,7 +37,9 @@
/** Print some debugging info. */
BFS_FORMATTER(2, 3)
static void bfs_exec_debug(const struct bfs_exec *execbuf, const char *format, ...) {
- if (!(execbuf->cmdline->debug & DEBUG_EXEC)) {
+ const struct cmdline *cmdline = execbuf->cmdline;
+
+ if (!bfs_debug(cmdline, DEBUG_EXEC, "${blu}")) {
return;
}
@@ -49,7 +51,7 @@ static void bfs_exec_debug(const struct bfs_exec *execbuf, const char *format, .
if (execbuf->flags & BFS_EXEC_CHDIR) {
fputs("dir", stderr);
}
- fputs(": ", stderr);
+ cfprintf(cmdline->cerr, "${rs}: ");
va_list args;
va_start(args, format);