chiark / gitweb /
job: print the "OK" status messages in normal green
authorMichal Schmidt <mschmidt@redhat.com>
Sat, 2 Mar 2013 12:16:27 +0000 (13:16 +0100)
committerMichal Schmidt <mschmidt@redhat.com>
Sat, 2 Mar 2013 16:56:32 +0000 (17:56 +0100)
The "OK" status messages should not draw attention to themselves.
It's better if they're not printed in bright/bold. Leave that
to errors and warnings.

Use a plain inconspicuous enterprisey green.

src/core/job.c
src/shared/util.h

index 90de550016ff22cbf34600e66f597c72467c33b2..d5b7987a00734c62b8465efd993481c3342684a6 100644 (file)
@@ -644,7 +644,7 @@ static void job_print_status_message(Unit *u, JobType t, JobResult result) {
 
                 case JOB_DONE:
                         if (u->condition_result)
-                                unit_status_printf(u, ANSI_HIGHLIGHT_GREEN_ON "  OK  " ANSI_HIGHLIGHT_OFF, format);
+                                unit_status_printf(u, ANSI_GREEN_ON "  OK  " ANSI_HIGHLIGHT_OFF, format);
                         break;
 
                 case JOB_FAILED:
@@ -678,7 +678,7 @@ static void job_print_status_message(Unit *u, JobType t, JobResult result) {
 
                 case JOB_DONE:
                 case JOB_FAILED:
-                        unit_status_printf(u, ANSI_HIGHLIGHT_GREEN_ON "  OK  " ANSI_HIGHLIGHT_OFF, format);
+                        unit_status_printf(u, ANSI_GREEN_ON "  OK  " ANSI_HIGHLIGHT_OFF, format);
                         break;
 
                 default:
index b5ad1ff3b5ddff08cd0b54d5a915e1c207cc9d6f..27b21f97cc4109da6e1e6bb0b3a7be8845f44103 100644 (file)
@@ -57,6 +57,7 @@ union dirent_storage {
 #define ANSI_HIGHLIGHT_ON "\x1B[1;39m"
 #define ANSI_RED_ON "\x1B[31m"
 #define ANSI_HIGHLIGHT_RED_ON "\x1B[1;31m"
+#define ANSI_GREEN_ON "\x1B[32m"
 #define ANSI_HIGHLIGHT_GREEN_ON "\x1B[1;32m"
 #define ANSI_HIGHLIGHT_YELLOW_ON "\x1B[1;33m"
 #define ANSI_HIGHLIGHT_OFF "\x1B[0m"