[ipxe-devel] uuid mangling patch
    Michael Brown 
    mbrown at fensystems.co.uk
       
    Tue Mar 19 12:29:02 UTC 2013
    
    
  
On Tuesday 19 Mar 2013 07:00:44 alexandru.bordei at gmail.com wrote:
> I had an issue with UUIDs mangled, on HP DL120 G7. Didn't had it on Dell PE
> R200 nor any IBM's. Anyway what I did was to tweak the uuid a bit. It now
> works as it should. I also added a touppercase conversion since i've seen
> that some BIOSes return it lower case and some uppercase.
A simpler way to achieve the exact same effect would be:
-       sprintf ( buf, "%08x-%04x-%04x-%04x-%02x%02x%02x%02x%02x%02x",
-                 be32_to_cpu ( uuid->canonical.a ),
-                 be16_to_cpu ( uuid->canonical.b ),
-                 be16_to_cpu ( uuid->canonical.c ),
-                 be16_to_cpu ( uuid->canonical.d ),
+       sprintf ( buf, "%08X-%04X-%04X-%04X-%02X%02X%02X%02X%02X%02X",
+                 le32_to_cpu ( uuid->canonical.a ),
+                 le16_to_cpu ( uuid->canonical.b ),
+                 le16_to_cpu ( uuid->canonical.c ),
+                 le16_to_cpu ( uuid->canonical.d ),
Unfortunately, both this and your original patch would have the effect of 
mangling UUIDs on all the machines that are not currently mangled.
I don't know why different BIOSes seem to have different endianness conventions 
for UUIDs.  If other tools (e.g. dmidecode) are able to extract the "correct" 
UUID, then it would be interesting to find out how.
Michael
    
    
More information about the ipxe-devel
mailing list