mirror of
https://github.com/systemd/systemd.git
synced 2024-12-04 15:53:41 +08:00
run/run: fix invocation ID handling
Fixes a regression introduced by 8157cc0e3e
.
This commit is contained in:
parent
68ee2ba1ee
commit
90db1582a9
@ -1610,7 +1610,7 @@ static int acquire_invocation_id(sd_bus *bus, const char *unit, sd_id128_t *ret)
|
||||
if (r < 0)
|
||||
return bus_log_parse_error(r);
|
||||
|
||||
return 0;
|
||||
return r; /* Return true when we get a non-null invocation ID. */
|
||||
}
|
||||
|
||||
static void set_window_title(PTYForward *f) {
|
||||
|
@ -914,16 +914,15 @@ int bus_message_read_id128(sd_bus_message *m, sd_id128_t *ret) {
|
||||
case 0:
|
||||
if (ret)
|
||||
*ret = SD_ID128_NULL;
|
||||
break;
|
||||
return 0;
|
||||
|
||||
case sizeof(sd_id128_t):
|
||||
if (ret)
|
||||
memcpy(ret, a, sz);
|
||||
break;
|
||||
return !memeqzero(a, sz); /* This intends to sd_id128_is_null(), but ret may be NULL, so
|
||||
* let'suse memeqzero() here. */
|
||||
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user