From e9edd94d0765a6a645da96023e2065d8cd30a837 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Wed, 23 May 2018 16:36:26 +0200 Subject: [PATCH] show terminal-errors in red color --- cmdline/main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmdline/main.c b/cmdline/main.c index d649743e..aa5103f4 100644 --- a/cmdline/main.c +++ b/cmdline/main.c @@ -35,6 +35,10 @@ all further options can be set using the set-command (type ? for help). */ #include "stress.h" +#define ANSI_RED "\e[31m" +#define ANSI_NORMAL "\e[0m" + + static char* read_cmd(void) { printf("> "); @@ -74,7 +78,7 @@ static uintptr_t receive_event(mrmailbox_t* mailbox, int event, uintptr_t data1, break; case MR_EVENT_ERROR: - printf("[ERROR #%i] %s\n", (int)data1, (char*)data2); + printf(ANSI_RED "[ERROR #%i] %s" ANSI_NORMAL "\n", (int)data1, (char*)data2); break; case MR_EVENT_HTTP_GET: