grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Bug in UUID determiniation in fs/fat.c


From: Daniel Mierswa
Subject: [PATCH] Bug in UUID determiniation in fs/fat.c
Date: Wed, 21 Jan 2009 00:31:52 +0100
User-agent: Thunderbird 2.0.0.19 (X11/20090103)

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. :)

-- 
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
Index: fs/fat.c
===================================================================
--- fs/fat.c    (revision 1952)
+++ fs/fat.c    (working copy)
@@ -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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]