Changes by: aia21
Update of /cvs/linux-ntfs/ntfsprogs/include/ntfs
In directory delta357.server4you.de:/tmp/cvs-serv13405/include/ntfs
Modified Files:
layout.h
Log Message:
Fix GUID to string conversion to follow documentation (details: it is not
little endian at all, it is a binary sequence)...
See remarks section at:
http://windowssdk.msdn.microsoft.com/en-us/library/96ff78dc.aspx
Index: layout.h
===================================================================
RCS file: /cvs/linux-ntfs/ntfsprogs/include/ntfs/layout.h,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -p -r1.56 -r1.57
--- layout.h 21 Apr 2006 16:12:48 -0000 1.56
+++ layout.h 10 Oct 2006 10:29:11 -0000 1.57
@@ -1142,16 +1142,24 @@ typedef struct {
* implementation of the distributed computing environment (DCE) universally
* unique identifier (UUID).
*
- * Example of a GUID:
+ * Example of a GUID in string format:
* 1F010768-5A73-BC91-0010-A52216A7227B
+ * And the same in binary:
+ * 1F0107685A73BC910010A52216A7227B
*/
-typedef struct {
- u32 data1; /* The first eight hexadecimal digits of the GUID. */
- u16 data2; /* The first group of four hexadecimal digits. */
- u16 data3; /* The second group of four hexadecimal digits. */
- u8 data4[8]; /* The first two bytes are the third group of four
- hexadecimal digits. The remaining six bytes are the
- final 12 hexadecimal digits. */
+typedef union {
+ struct {
+ u32 data1; /* The first eight hexadecimal digits of the
+ GUID. */
+ u16 data2; /* The first group of four hexadecimal
+ digits. */
+ u16 data3; /* The second group of four hexadecimal
+ digits. */
+ u8 data4[8]; /* The first two bytes are the third group of
+ four hexadecimal digits. The remaining six
+ bytes are the final 12 hexadecimal digits. */
+ };
+ u8 raw[16]; /* Raw binary for ease of access. */
} __attribute__((__packed__)) GUID;
/**
|