Skip to content

Commit 4e12442

Browse files
committed
shared/find-esp: fix inverted check for XBOOTLDR type
1 parent 5aa285b commit 4e12442

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/shared/find-esp.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,11 @@ static int verify_xbootldr_udev(
571571
r = sd_device_get_property_value(d, "ID_PART_ENTRY_TYPE", &v);
572572
if (r < 0)
573573
return log_error_errno(r, "Failed to get device property: %m");
574-
if (id128_equal_string(v, GPT_XBOOTLDR))
574+
575+
r = id128_equal_string(v, GPT_XBOOTLDR);
576+
if (r < 0)
577+
return log_error_errno(r, "Failed to parse ID_PART_ENTRY_TYPE=%s: %m", v);
578+
if (r == 0)
575579
return log_full_errno(searching ? LOG_DEBUG : LOG_ERR,
576580
searching ? SYNTHETIC_ERRNO(EADDRNOTAVAIL) : SYNTHETIC_ERRNO(ENODEV),
577581
"File system \"%s\" has wrong type for extended boot loader partition.", node);

0 commit comments

Comments
 (0)