|
|
b58cad |
From bb82dda52da2029a527577a796daffcbc97d8e83 Mon Sep 17 00:00:00 2001
|
|
|
b58cad |
From: Lyonel Vincent <lyonel@ezix.org>
|
|
|
b58cad |
Date: Mon, 30 Mar 2020 23:36:15 +0200
|
|
|
b58cad |
Subject: [PATCH 03/17] correctly format SMBIOS UUID
|
|
|
b58cad |
MIME-Version: 1.0
|
|
|
b58cad |
Content-Type: text/plain; charset=UTF-8
|
|
|
b58cad |
Content-Transfer-Encoding: 8bit
|
|
|
b58cad |
|
|
|
b58cad |
cf. https://en.wikipedia.org/wiki/Universally_unique_identifier (RFC 4122 Section 3 requires that the characters be generated in lower case, while being case-insensitive on input.)
|
|
|
b58cad |
|
|
|
b58cad |
cf. https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_2.7.1.pdf ยง7.2.1
|
|
|
b58cad |
|
|
|
b58cad |
---
|
|
|
b58cad |
src/core/dmi.cc | 4 ++--
|
|
|
b58cad |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
b58cad |
|
|
|
b58cad |
diff --git a/src/core/dmi.cc b/src/core/dmi.cc
|
|
|
b58cad |
index c4c01e02a392..30b3ab3b995c 100644
|
|
|
b58cad |
--- a/src/core/dmi.cc
|
|
|
b58cad |
+++ b/src/core/dmi.cc
|
|
|
b58cad |
@@ -195,8 +195,8 @@ static string dmi_uuid(const u8 * p)
|
|
|
b58cad |
return string(REMOVED);
|
|
|
b58cad |
|
|
|
b58cad |
snprintf(buffer, sizeof(buffer),
|
|
|
b58cad |
- "%02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X",
|
|
|
b58cad |
- p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7], p[8], p[9], p[10],
|
|
|
b58cad |
+ "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x",
|
|
|
b58cad |
+ p[3], p[2], p[1], p[0], p[5], p[4], p[7], p[6], p[8], p[9], p[10],
|
|
|
b58cad |
p[11], p[12], p[13], p[14], p[15]);
|
|
|
b58cad |
|
|
|
b58cad |
return hw::strip(string(buffer));
|
|
|
b58cad |
--
|
|
|
b58cad |
2.17.1
|
|
|
b58cad |
|