summaryrefslogtreecommitdiff
path: root/src/shared/find-esp.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-09-15 17:48:16 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-09-20 16:48:50 +0200
commit92e720281250aab9cd2728964c9d38d93b5b2013 (patch)
treebf52bef9440a6cc83d1c75d7be9a7818d9ce0305 /src/shared/find-esp.c
parentb66a6e1a5838b874b789820c090dd6850cf10513 (diff)
downloadsystemd-92e720281250aab9cd2728964c9d38d93b5b2013.tar.gz
headers: export partition uuids and flags in new sd-gpt.h file
I think those constants are generally useful. It's quite easy to make a mistake when copying things from the docs, so let's make them easy and convenient to access.
Diffstat (limited to 'src/shared/find-esp.c')
-rw-r--r--src/shared/find-esp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/shared/find-esp.c b/src/shared/find-esp.c
index 2041d7f4b2..889ba8c46b 100644
--- a/src/shared/find-esp.c
+++ b/src/shared/find-esp.c
@@ -92,7 +92,7 @@ static int verify_esp_blkid(
r = blkid_probe_lookup_value(b, "PART_ENTRY_TYPE", &v, NULL);
if (r != 0)
return log_error_errno(errno ?: EIO, "Failed to probe partition type UUID of \"%s\": %m", node);
- if (sd_id128_string_equal(v, GPT_ESP) <= 0)
+ if (sd_id128_string_equal(v, SD_GPT_ESP) <= 0)
return log_full_errno(searching ? LOG_DEBUG : LOG_ERR,
SYNTHETIC_ERRNO(searching ? EADDRNOTAVAIL : ENODEV),
"File system \"%s\" has wrong type for an EFI System Partition (ESP).", node);
@@ -184,7 +184,7 @@ static int verify_esp_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 (sd_id128_string_equal(v, GPT_ESP) <= 0)
+ if (sd_id128_string_equal(v, SD_GPT_ESP) <= 0)
return log_full_errno(searching ? LOG_DEBUG : LOG_ERR,
SYNTHETIC_ERRNO(searching ? EADDRNOTAVAIL : ENODEV),
"File system \"%s\" has wrong type for an EFI System Partition (ESP).", node);
@@ -540,7 +540,7 @@ static int verify_xbootldr_blkid(
r = blkid_probe_lookup_value(b, "PART_ENTRY_TYPE", &v, NULL);
if (r != 0)
return log_error_errno(errno ?: SYNTHETIC_ERRNO(EIO), "%s: Failed to probe PART_ENTRY_TYPE: %m", node);
- if (sd_id128_string_equal(v, GPT_XBOOTLDR) <= 0)
+ if (sd_id128_string_equal(v, SD_GPT_XBOOTLDR) <= 0)
return log_full_errno(searching ? LOG_DEBUG : LOG_ERR,
searching ? SYNTHETIC_ERRNO(EADDRNOTAVAIL) : SYNTHETIC_ERRNO(ENODEV),
"%s: Partitition has wrong PART_ENTRY_TYPE=%s for XBOOTLDR partition.", node, v);
@@ -604,7 +604,7 @@ static int verify_xbootldr_udev(
if (r < 0)
return log_device_error_errno(d, r, "Failed to query ID_PART_ENTRY_TYPE: %m");
- r = sd_id128_string_equal(v, GPT_XBOOTLDR);
+ r = sd_id128_string_equal(v, SD_GPT_XBOOTLDR);
if (r < 0)
return log_device_error_errno(d, r, "Failed to parse ID_PART_ENTRY_TYPE=%s: %m", v);
if (r == 0)