From: Lennart Poettering Date: Thu, 18 Jul 2013 00:31:06 +0000 (+0200) Subject: systemctl: also highlight a load state of "not-found" as red X-Git-Tag: v206~54 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=2ce982f9b1a9f409b10fc4c0f3faa6b594b58df9;hp=20422497109aaba1d214f1597530de8b8788a526 systemctl: also highlight a load state of "not-found" as red "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. --- diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 9574ff20b..6fdbc417b 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -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