summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/uuid.h
diff options
context:
space:
mode:
authorMichael Brown2024-02-29 14:58:50 +0100
committerMichael Brown2024-02-29 15:43:55 +0100
commitda7b2662890dfb284786f37237a6c92809eee217 (patch)
treeb162da60cf331f5db4f1389ebdef1556542858f2 /src/include/ipxe/uuid.h
parent[efi] Work around broken boot services table manipulation by UEFI shim (diff)
downloadipxe-da7b2662890dfb284786f37237a6c92809eee217.tar.gz
ipxe-da7b2662890dfb284786f37237a6c92809eee217.tar.xz
ipxe-da7b2662890dfb284786f37237a6c92809eee217.zip
[uuid] Add uuid_aton() to parse a UUID from a string
Add uuid_aton() to parse a UUID value from a string (analogous to inet_aton(), inet6_aton(), sock_aton(), etc), treating it as a 32-digit hex string with optional hyphen separators. The placement of the separators is not checked: each byte within the hex string may be separated by a hyphen, or not separated at all. Add dedicated self-tests for UUID parsing and formatting (already partially covered by the ":uuid" and ":guid" settings self-tests). Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/uuid.h')
-rw-r--r--src/include/ipxe/uuid.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/ipxe/uuid.h b/src/include/ipxe/uuid.h
index 24c46aca..4874b738 100644
--- a/src/include/ipxe/uuid.h
+++ b/src/include/ipxe/uuid.h
@@ -48,5 +48,6 @@ static inline void uuid_mangle ( union uuid *uuid ) {
}
extern const char * uuid_ntoa ( const union uuid *uuid );
+extern int uuid_aton ( const char *string, union uuid *uuid );
#endif /* _IPXE_UUID_H */