From: Yu Watanabe Date: Wed, 24 Apr 2024 05:58:07 +0000 (+0900) Subject: run/run: fix invocation ID handling X-Git-Tag: v256-rc1~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=90db1582a97d048769198ee1c0f367d003eeb130;p=thirdparty%2Fsystemd.git run/run: fix invocation ID handling Fixes a regression introduced by 8157cc0e3e33c97b406cc088cf001ca524154f64. --- diff --git a/src/run/run.c b/src/run/run.c index 9d84d063316..1a3b125c6f1 100644 --- a/src/run/run.c +++ b/src/run/run.c @@ -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) { diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c index 9a480aa0e3a..dfe8b60ecdb 100644 --- a/src/shared/bus-util.c +++ b/src/shared/bus-util.c @@ -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; }