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