summaryrefslogtreecommitdiff
path: root/lib/uuid.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/uuid.c')
-rw-r--r--lib/uuid.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/lib/uuid.c b/lib/uuid.c
index c6a27b7d044..97388f597a6 100644
--- a/lib/uuid.c
+++ b/lib/uuid.c
@@ -35,6 +35,7 @@
#ifdef USE_HOSTCC
/* polyfill hextoul to avoid pulling in strto.c */
#define hextoul(cp, endp) strtoul(cp, endp, 16)
+#define hextoull(cp, endp) strtoull(cp, endp, 16)
#endif
int uuid_str_valid(const char *uuid)
@@ -174,6 +175,20 @@ static const struct {
"Firmware Management",
EFI_FIRMWARE_MANAGEMENT_PROTOCOL_GUID
},
+#if IS_ENABLED(CONFIG_EFI_HTTP_PROTOCOL)
+ {
+ "HTTP",
+ EFI_HTTP_PROTOCOL_GUID,
+ },
+ {
+ "HTTP Service Binding",
+ EFI_HTTP_SERVICE_BINDING_PROTOCOL_GUID,
+ },
+ {
+ "IPv4 Config2",
+ EFI_IP4_CONFIG2_PROTOCOL_GUID,
+ },
+#endif
/* Configuration table GUIDs */
{
"ACPI table",
@@ -312,7 +327,7 @@ int uuid_str_to_bin(const char *uuid_str, unsigned char *uuid_bin,
tmp16 = cpu_to_be16(hextoul(uuid_str + 19, NULL));
memcpy(uuid_bin + 8, &tmp16, 2);
- tmp64 = cpu_to_be64(hextoul(uuid_str + 24, NULL));
+ tmp64 = cpu_to_be64(hextoull(uuid_str + 24, NULL));
memcpy(uuid_bin + 10, (char *)&tmp64 + 2, 6);
return 0;
@@ -339,7 +354,7 @@ int uuid_str_to_le_bin(const char *uuid_str, unsigned char *uuid_bin)
tmp16 = cpu_to_le16(hextoul(uuid_str + 19, NULL));
memcpy(uuid_bin + 8, &tmp16, 2);
- tmp64 = cpu_to_le64(hextoul(uuid_str + 24, NULL));
+ tmp64 = cpu_to_le64(hextoull(uuid_str + 24, NULL));
memcpy(uuid_bin + 10, &tmp64, 6);
return 0;