1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-31 21:18:09 +03:00

systemctl: show whether we follow somebody in 'status' output

This commit is contained in:
Lennart Poettering 2010-10-12 04:04:54 +02:00
parent 06ae4bfeb0
commit 4a9e2fffdf

View File

@ -1568,6 +1568,7 @@ typedef struct UnitStatusInfo {
const char *sub_state;
const char *description;
const char *following;
const char *path;
const char *default_control_group;
@ -1629,6 +1630,9 @@ static void print_status_info(UnitStatusInfo *i) {
printf("\n");
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")) {
on = ansi_highlight(true);
@ -1841,6 +1845,8 @@ static int status_property(const char *name, DBusMessageIter *iter, UnitStatusIn
i->where = s;
else if (streq(name, "What"))
i->what = s;
else if (streq(name, "Following"))
i->following = s;
}
break;