systemctl: show ExecStop= data after ExecStart= data
the service manager serializes ExecStop= execution data after ExecStart=, like it makes sense and how it should be expected. However, systemctl previously would reverse them when deserializing them locally, and thus show ExecStop= results before ExecStart= results. And that's confusing. Let's fix that.
This commit is contained in:
parent
6a1d4d9fa6
commit
3e14d36a8a
|
@ -4548,6 +4548,7 @@ static int map_asserts(sd_bus *bus, const char *member, sd_bus_message *m, sd_bu
|
|||
|
||||
static int map_exec(sd_bus *bus, const char *member, sd_bus_message *m, sd_bus_error *error, void *userdata) {
|
||||
_cleanup_free_ ExecStatusInfo *info = NULL;
|
||||
ExecStatusInfo *last;
|
||||
UnitStatusInfo *i = userdata;
|
||||
int r;
|
||||
|
||||
|
@ -4559,13 +4560,16 @@ static int map_exec(sd_bus *bus, const char *member, sd_bus_message *m, sd_bus_e
|
|||
if (!info)
|
||||
return -ENOMEM;
|
||||
|
||||
LIST_FIND_TAIL(exec, i->exec, last);
|
||||
|
||||
while ((r = exec_status_info_deserialize(m, info)) > 0) {
|
||||
|
||||
info->name = strdup(member);
|
||||
if (!info->name)
|
||||
return -ENOMEM;
|
||||
|
||||
LIST_PREPEND(exec, i->exec, info);
|
||||
LIST_INSERT_AFTER(exec, i->exec, last, info);
|
||||
last = info;
|
||||
|
||||
info = new0(ExecStatusInfo, 1);
|
||||
if (!info)
|
||||
|
|
Loading…
Reference in a new issue