[systemd-commits] src/systemctl.c

Michal Schmidt michich at kemper.freedesktop.org
Mon Dec 5 16:36:23 PST 2011


 src/systemctl.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit f7b9e331ed71fb2f832ac5587fb5119dd2bfc32f
Author: Michal Schmidt <mschmidt at redhat.com>
Date:   Tue Dec 6 01:14:36 2011 +0100

    systemctl: print 'error' load state in red
    
    Be consistent in coloring of load states in list-units and status.
    Print only 'error' in red.
    There are no 'banned' or 'failed' states. Do not color 'masked', it's
    not an error.

diff --git a/src/systemctl.c b/src/systemctl.c
index b940c9c..298cb4e 100644
--- a/src/systemctl.c
+++ b/src/systemctl.c
@@ -377,8 +377,7 @@ static void output_units_list(const struct unit_info *unit_infos, unsigned c) {
 
                 n_shown++;
 
-                if (!streq(u->load_state, "loaded") &&
-                    !streq(u->load_state, "banned")) {
+                if (streq(u->load_state, "error")) {
                         on_loaded = ansi_highlight(true);
                         off_loaded = ansi_highlight(false);
                 } else
@@ -2063,8 +2062,7 @@ static void print_status_info(UnitStatusInfo *i) {
         if (i->following)
                 printf("\t  Follow: unit currently follows state of %s\n", i->following);
 
-        if (streq_ptr(i->load_state, "failed") ||
-            streq_ptr(i->load_state, "banned")) {
+        if (streq_ptr(i->load_state, "error")) {
                 on = ansi_highlight(true);
                 off = ansi_highlight(false);
         } else



More information about the systemd-commits mailing list