]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/shared/find-esp.c
Merge pull request #24709 from keszybz/partition-table-constants
[thirdparty/systemd.git] / src / shared / find-esp.c
index 22e7f7472d7b13ca65d2fa9f9b95a3e068419c56..dfe0574aba6b16010662ade9fc0842b61320e43f 100644 (file)
@@ -94,7 +94,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);
@@ -186,7 +186,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);
@@ -582,7 +582,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);
@@ -646,7 +646,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)