From: Theodore Ts'o Date: Sat, 20 Mar 2004 02:54:13 +0000 (-0500) Subject: Add UUID type #define's, and add an CPP macro to define X-Git-Tag: APPLE_UUID_SNAP_1~18 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=880f30a7ebf25c15a75173dcd9393e66181f8ffc;p=tools%2Fe2fsprogs.git Add UUID type #define's, and add an CPP macro to define UUID constants. --- diff --git a/lib/uuid/ChangeLog b/lib/uuid/ChangeLog index 77f0f71..9dce4c7 100644 --- a/lib/uuid/ChangeLog +++ b/lib/uuid/ChangeLog @@ -1,5 +1,8 @@ 2004-03-19 Theodore Ts'o + * uuid.h (UUID_DEFINE): Add UUID type #define's, and add an CPP + macro to define UUID constants. + * gen_uuid.c (get_clock): Use 14 bits for the clock sequence, instead of just 13 bits. diff --git a/lib/uuid/uuid.h b/lib/uuid/uuid.h index 5720d7f..505a9f0 100644 --- a/lib/uuid/uuid.h +++ b/lib/uuid/uuid.h @@ -24,6 +24,14 @@ typedef unsigned char uuid_t[16]; #define UUID_VARIANT_MICROSOFT 2 #define UUID_VARIANT_OTHER 3 +/* UUID Type definitions */ +#define UUID_TYPE_DCE_TIME 1 +#define UUID_TYPE_DCE_RANDOM 4 + +/* Allow UUID constants to be defined */ +#define UUID_DEFINE(name,u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15) \ + const uuid_t name = {u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15} + #ifdef __cplusplus extern "C" { #endif