]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[settings] Support formatting UUIDs as little-endian GUIDs 545/head
authorMichael Brown <mcb30@ipxe.org>
Tue, 4 Jan 2022 13:31:15 +0000 (13:31 +0000)
committerMichael Brown <mcb30@ipxe.org>
Tue, 4 Jan 2022 14:03:12 +0000 (14:03 +0000)
commitf43c2fd69749bb9a44f2a3ab61b6735938432b52
treeb5afddef6c6f701312dda21aa4732e9c0253d587
parent9062544f6a0c69c249b90d21a08d05518aafc2ec
[settings] Support formatting UUIDs as little-endian GUIDs

The RFC4122 specification defines UUIDs as being in network byte
order, but an unfortunately significant amount of (mostly Microsoft)
software treats them as having the first three fields in little-endian
byte order.

In an ideal world, any server-side software that compares UUIDs for
equality would perform an endian-insensitive comparison (analogous to
comparing strings for equality using a case-insensitive comparison),
and would therefore not care about byte order differences.

Define a setting type name ":guid" to allow a UUID setting to be
formatted in little-endian order, to simplify interoperability with
server-side software that expects such a formatting.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/core/settings.c
src/include/ipxe/settings.h
src/interface/smbios/smbios_settings.c
src/tests/settings_test.c