summaryrefslogtreecommitdiff
path: root/src/systemctl.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-07-31 18:28:02 +0200
committerLennart Poettering <lennart@poettering.net>2011-07-31 18:28:02 +0200
commita43757462acaffa902417a9876486763d0b7ed58 (patch)
tree25b7bec4cdea2c75e977e5bb825789422764e9ea /src/systemctl.c
parent07672f492ef085a9143ce3535700c0d4e83173de (diff)
dbus: export unit file state
Diffstat (limited to 'src/systemctl.c')
-rw-r--r--src/systemctl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/systemctl.c b/src/systemctl.c
index 3eb8ab5b5c..4981433ebe 100644
--- a/src/systemctl.c
+++ b/src/systemctl.c
@@ -1962,6 +1962,7 @@ typedef struct UnitStatusInfo {
const char *load_state;
const char *active_state;
const char *sub_state;
+ const char *unit_file_state;
const char *description;
const char *following;
@@ -2043,6 +2044,8 @@ static void print_status_info(UnitStatusInfo *i) {
if (i->load_error)
printf("\t Loaded: %s%s%s (Reason: %s)\n", on, strna(i->load_state), off, i->load_error);
+ else if (i->path && i->unit_file_state)
+ printf("\t Loaded: %s%s%s (%s; %s)\n", on, strna(i->load_state), off, i->path, i->unit_file_state);
else if (i->path)
printf("\t Loaded: %s%s%s (%s)\n", on, strna(i->load_state), off, i->path);
else
@@ -2285,6 +2288,8 @@ static int status_property(const char *name, DBusMessageIter *iter, UnitStatusIn
i->what = s;
else if (streq(name, "Following"))
i->following = s;
+ else if (streq(name, "UnitFileState"))
+ i->unit_file_state = s;
}
break;