chiark / gitweb /
systemctl: also highlight a load state of "not-found" as red
authorLennart Poettering <lennart@poettering.net>
Thu, 18 Jul 2013 00:31:06 +0000 (02:31 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 18 Jul 2013 00:32:34 +0000 (02:32 +0200)
"not-found" is a recently added load state and was previously just a
special case of "error". Since it also indicates a load error we should
also highlight it red, the same way as "error" was treated before.

src/systemctl/systemctl.c

index 9574ff20bdfcaf21e9c06b8c83cdb810d27ba0f6..6fdbc417b6e28776344d68edb30451531c32e889 100644 (file)
@@ -381,7 +381,8 @@ static void output_units_list(const struct unit_info *unit_infos, unsigned c) {
 
                 n_shown++;
 
-                if (streq(u->load_state, "error")) {
+                if (streq(u->load_state, "error") ||
+                    streq(u->load_state, "not-found")) {
                         on_loaded = on = ansi_highlight_red(true);
                         off_loaded = off = ansi_highlight_red(false);
                 } else