summaryrefslogtreecommitdiffstats
path: root/src/kernel-install
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2023-08-09 17:51:24 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2023-08-16 12:52:56 +0200
commitd66ad6ff854fd1f587ba686e5ef2025c5c3a72dc (patch)
tree6001d24f8c658426dd932b6929da6a28087a206d /src/kernel-install
parentshared/cgroup-show: do not format path twice (diff)
downloadsystemd-d66ad6ff854fd1f587ba686e5ef2025c5c3a72dc.tar.xz
systemd-d66ad6ff854fd1f587ba686e5ef2025c5c3a72dc.zip
sd-id128: introduce ERRNO_IS_NEG_MACHINE_ID_UNSET
Diffstat (limited to 'src/kernel-install')
-rw-r--r--src/kernel-install/kernel-install.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/kernel-install/kernel-install.c b/src/kernel-install/kernel-install.c
index 7de62f3ba4..abd6e2fdce 100644
--- a/src/kernel-install/kernel-install.c
+++ b/src/kernel-install/kernel-install.c
@@ -448,11 +448,10 @@ static int context_load_machine_id(Context *c) {
assert(c);
r = id128_get_machine_at(c->rfd, &c->machine_id);
- if (r < 0) {
- if (ERRNO_IS_MACHINE_ID_UNSET(r))
- return 0;
+ if (ERRNO_IS_NEG_MACHINE_ID_UNSET(r))
+ return 0;
+ if (r < 0)
return log_error_errno(r, "Failed to load machine ID from /etc/machine-id: %m");
- }
log_debug("MACHINE_ID=%s set via /etc/machine-id.", SD_ID128_TO_STRING(c->machine_id));
return 1; /* loaded */