Skip to contentSkip to conversation

Bug in UUID determiniation in fs/fat.c

PATCH Applied Daniel Mierswa 2 participants 2 messages Jan 20, 2009 – Jan 26, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Bug in UUID determiniation in fs/fat.c

I found that during playing with ls -a. The UUID needs to be right-shifted 16 times since it's a 32bit value and we need two 16bit values. :)

Signature · 5 lines
Mierswa, Daniel

If you still don't like it, that's ok: that's why I'm boss. I simply
know better than you do.
               --- Linus Torvalds, comp.os.linux.advocacy, 1996/07/22
fat.c +1 -1
Index: fs/fat.c
===================================================================
@@ -841,7 +841,7 @@
   if (data)
     {
       *uuid = grub_malloc (sizeof ("xxxx-xxxx"));
-      grub_sprintf (*uuid, "%04x-%04x", (grub_uint16_t) (data->uuid >> 8),
+      grub_sprintf (*uuid, "%04x-%04x", (grub_uint16_t) (data->uuid >> 16),
 		    (grub_uint16_t) data->uuid);
     }
   else
Applied
#1 lore raw
Quoted 3 lines · Daniel Mierswa

I found that during playing with ls -a. The UUID needs to be right-shifted 16 times since it's a 32bit value and we need two 16bit values. :)

Applied. Thank you!

Signature · 2 lines
Regards,
Pavel Roskin