]> err.no Git - systemd/commitdiff
systemctl: print 'error' load state in red
authorMichal Schmidt <mschmidt@redhat.com>
Tue, 6 Dec 2011 00:14:36 +0000 (01:14 +0100)
committerMichal Schmidt <mschmidt@redhat.com>
Tue, 6 Dec 2011 00:30:16 +0000 (01:30 +0100)
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.

src/systemctl.c

index b940c9c64e7eac9a4bcfed74b2e1581fc012ea1f..298cb4ee5c4f9edab5248b92d67571b25ce6475b 100644 (file)
@@ -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