diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-07-07 17:33:26 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-07-07 17:33:26 +0200 |
commit | b4af5a803aa71a57733ca46fef29b7afb20a626c (patch) | |
tree | a96bc6a42f22b28b564911685323f8e301c4c410 /src | |
parent | 2040ccf171404b709acb0ecf1d1f17b87c5d05f0 (diff) |
systemctl: show StatusErrno value in "systemctl status"
Diffstat (limited to 'src')
-rw-r--r-- | src/systemctl/systemctl.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 03720f411d..1ab4794bd6 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -3170,6 +3170,7 @@ typedef struct UnitStatusInfo { const char *status_text; const char *pid_file; bool running:1; + int status_errno; usec_t start_timestamp; usec_t exit_timestamp; @@ -3441,6 +3442,8 @@ static void print_status_info( if (i->status_text) printf(" Status: \"%s\"\n", i->status_text); + if (i->status_errno > 0) + printf(" Error: %i (%s)\n", i->status_errno, strerror(i->status_errno)); if (i->control_group && (i->main_pid > 0 || i->control_pid > 0 || @@ -3661,6 +3664,8 @@ static int status_property(const char *name, sd_bus_message *m, UnitStatusInfo * i->exit_code = (int) j; else if (streq(name, "ExecMainStatus")) i->exit_status = (int) j; + else if (streq(name, "StatusErrno")) + i->status_errno = (int) j; break; } |