summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-05-26 21:36:33 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-05-26 21:49:38 +0200
commit4e124425547e243482a1bae43cd20853de13172f (patch)
tree2d28b39a411a274a560ef9a6e1a599757b1fb9e4 /src
parentkernel-install: if a plugin fails, return error immediately (diff)
downloadsystemd-4e124425547e243482a1bae43cd20853de13172f.tar.xz
systemd-4e124425547e243482a1bae43cd20853de13172f.zip
shared/find-esp: fix inverted check for XBOOTLDR type
Diffstat (limited to 'src')
-rw-r--r--src/shared/find-esp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/shared/find-esp.c b/src/shared/find-esp.c
index 75e639dd99..3b0c6d3fa9 100644
--- a/src/shared/find-esp.c
+++ b/src/shared/find-esp.c
@@ -571,7 +571,11 @@ static int verify_xbootldr_udev(
r = sd_device_get_property_value(d, "ID_PART_ENTRY_TYPE", &v);
if (r < 0)
return log_error_errno(r, "Failed to get device property: %m");
- if (id128_equal_string(v, GPT_XBOOTLDR))
+
+ r = id128_equal_string(v, GPT_XBOOTLDR);
+ if (r < 0)
+ return log_error_errno(r, "Failed to parse ID_PART_ENTRY_TYPE=%s: %m", v);
+ if (r == 0)
return log_full_errno(searching ? LOG_DEBUG : LOG_ERR,
searching ? SYNTHETIC_ERRNO(EADDRNOTAVAIL) : SYNTHETIC_ERRNO(ENODEV),
"File system \"%s\" has wrong type for extended boot loader partition.", node);