diff options
author | root <root> | 2007-09-08 18:21:23 +0000 |
---|---|---|
committer | root <root> | 2007-09-08 18:21:23 +0000 |
commit | b013532b3061cc661ee9d0b141efbc86cda5c320 (patch) | |
tree | 131cf0204aa8a73ea7594649a8e0a3a26340e9ae /src/guid.h | |
parent | 44341d32524c1621357bac52ffca7d8e9270c3e4 (diff) | |
download | gpt-b013532b3061cc661ee9d0b141efbc86cda5c320.tar.gz gpt-b013532b3061cc661ee9d0b141efbc86cda5c320.tar.bz2 gpt-b013532b3061cc661ee9d0b141efbc86cda5c320.zip |
*** empty log message ***
Diffstat (limited to 'src/guid.h')
-rw-r--r-- | src/guid.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/guid.h b/src/guid.h new file mode 100644 index 0000000..f92607d --- /dev/null +++ b/src/guid.h @@ -0,0 +1,40 @@ + +#define GUID_16(a) \ + (((a) >> 8) & 0xff), \ + (((a)) & 0xff), + +#define GUID_48(a) \ + (((a) >> 40) & 0xff), \ + (((a) >> 32) & 0xff), \ + (((a) >> 24) & 0xff), \ + (((a) >> 16) & 0xff), \ + (((a) >> 8) & 0xff), \ + (((a)) & 0xff), + +#define GUID_FLIP_32(a) \ + (((a)) & 0xff), \ + (((a) >> 8) & 0xff), \ + (((a) >> 16) & 0xff), \ + (((a) >> 24) & 0xff), + +#define GUID_FLIP_16(a) \ + (((a)) & 0xff), \ + (((a) >> 8) & 0xff), + +#define MAKE_GUID(a,b,c,d,e) \ + {{ \ + GUID_FLIP_32(0x ## a) \ + GUID_FLIP_16(0x ## b) \ + GUID_FLIP_16(0x ## c) \ + GUID_16(0x ## d) \ + GUID_48(0x ## e ## ULL) \ + }} + +typedef struct +{ + uint8_t d[16]; +} PACKED GUID; + + + + |