mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-21 06:49:35 +00:00
guid: Make use of GUID printf format specifier
Use the new printf format specifier %pG. Fixes the text representation of GUIDs in the output of the lsefisystab command (missing 4th dash). Signed-off-by: Oliver Steffen <osteffen@redhat.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
1 parent
f82dbf2bd8
commit
6ad116e5ff
5 files changed
+10
-58
No files matched your search
@@ -726,13 +726,8 @@ grub_cpu_xnu_fill_devicetree (grub_uint64_t *fsbfreq_out)
|
||||
#endif
|
||||
|
||||
/* The name of key for new table. */
|
||||
grub_snprintf (guidbuf, sizeof (guidbuf), "%08x-%04x-%04x-%02x%02x-",
|
||||
guid.data1, guid.data2, guid.data3, guid.data4[0],
|
||||
guid.data4[1]);
|
||||
for (j = 2; j < 8; j++)
|
||||
grub_snprintf (guidbuf + grub_strlen (guidbuf),
|
||||
sizeof (guidbuf) - grub_strlen (guidbuf),
|
||||
"%02x", guid.data4[j]);
|
||||
grub_snprintf (guidbuf, sizeof (guidbuf), "%pG", &guid);
|
||||
|
||||
/* For some reason GUID has to be in uppercase. */
|
||||
for (j = 0; guidbuf[j] ; j++)
|
||||
if (guidbuf[j] >= 'a' && guidbuf[j] <= 'f')
|
||||
|
||||
Reference in new issue
Block a user