systemctl: show StatusErrno value in "systemctl status"
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user