diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-12-02 02:38:18 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-12-02 13:23:04 +0100 |
commit | d2dc52dbc45051faa6356213a537081084e9dda4 (patch) | |
tree | b042b6eba6339a42971cf3c1ae27507bbcc202a5 /src/systemctl | |
parent | e5035a2778b7ed2a8ac901521ed47cf079359e68 (diff) |
systemctl: show unit file preset state in "systemctl status" output"
Diffstat (limited to 'src/systemctl')
-rw-r--r-- | src/systemctl/systemctl.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 3f5bcdd1fb..74af772794 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -3221,6 +3221,7 @@ typedef struct UnitStatusInfo { const char *active_state; const char *sub_state; const char *unit_file_state; + const char *unit_file_preset; const char *description; const char *following; @@ -3344,7 +3345,10 @@ static void print_status_info( if (i->load_error) printf(" Loaded: %s%s%s (Reason: %s)\n", on, strna(i->load_state), off, i->load_error); - else if (path && i->unit_file_state) + else if (path && !isempty(i->unit_file_state) && !isempty(i->unit_file_preset)) + printf(" Loaded: %s%s%s (%s; %s; vendor preset: %s)\n", + on, strna(i->load_state), off, path, i->unit_file_state, i->unit_file_preset); + else if (path && !isempty(i->unit_file_state)) printf(" Loaded: %s%s%s (%s; %s)\n", on, strna(i->load_state), off, path, i->unit_file_state); else if (path) @@ -3669,6 +3673,8 @@ static int status_property(const char *name, sd_bus_message *m, UnitStatusInfo * i->following = s; else if (streq(name, "UnitFileState")) i->unit_file_state = s; + else if (streq(name, "UnitFilePreset")) + i->unit_file_preset = s; else if (streq(name, "Result")) i->result = s; } |