diff options
author | Roy Marples <roy@marples.name> | 2007-04-17 09:32:18 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2007-04-17 09:32:18 +0000 |
commit | f657d87b997f5b599d74a8f2eb6fef8dd6381550 (patch) | |
tree | 5bd3799657e97edabe5ff83e5ac145f3d15931d8 /src/rc-status.c | |
parent | 0f92b5e7df4ead366984b5624de12446bd968478 (diff) |
Rationalise our colour usage a little.
Diffstat (limited to 'src/rc-status.c')
-rw-r--r-- | src/rc-status.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/rc-status.c b/src/rc-status.c index 76dedce9..2cf4ed0c 100644 --- a/src/rc-status.c +++ b/src/rc-status.c @@ -18,34 +18,34 @@ static void print_level (char *level) { - printf ("Runlevel: "); - PEINFO_HILITE; - printf ("%s\n", level); - PEINFO_NORMAL; + printf ("Runlevel: %s%s%s\n", + ecolor (ecolor_hilite), + level, + ecolor (ecolor_normal)); } static void print_service (char *service) { char status[10]; int cols = printf (" %s\n", service); - einfo_color_t color = einfo_bad; + einfo_color_t color = ecolor_bad; if (rc_service_state (service, rc_service_stopping)) snprintf (status, sizeof (status), "stopping "); else if (rc_service_state (service, rc_service_starting)) { snprintf (status, sizeof (status), "starting "); - color = einfo_warn; + color = ecolor_warn; } else if (rc_service_state (service, rc_service_inactive)) { snprintf (status, sizeof (status), "inactive "); - color = einfo_warn; + color = ecolor_warn; } else if (geteuid () == 0 && rc_service_state (service, rc_service_crashed)) snprintf (status, sizeof (status), " crashed "); else if (rc_service_state (service, rc_service_started)) { snprintf (status, sizeof (status), " started "); - color = einfo_good; + color = ecolor_good; } else if (rc_service_state (service, rc_service_scheduled)) { snprintf (status, sizeof (status), "scheduled"); - color = einfo_warn; + color = ecolor_warn; } else snprintf (status, sizeof (status), " stopped "); ebracket (cols, color, status); |