From: Theodore Ts'o Date: Wed, 5 May 2004 00:51:02 +0000 (-0400) Subject: gen_uuid.c (uuid_generate_time): Mask off the timestamp to avoid X-Git-Tag: E2FSPROGS-1_36~166 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d1492994a51719dc59932151b55a9b24e1879bce;p=thirdparty%2Fe2fsprogs.git gen_uuid.c (uuid_generate_time): Mask off the timestamp to avoid a Y8.8888K problem. --- diff --git a/lib/uuid/ChangeLog b/lib/uuid/ChangeLog index fd665c53c..ba1e63c8d 100644 --- a/lib/uuid/ChangeLog +++ b/lib/uuid/ChangeLog @@ -1,3 +1,8 @@ +2004-05-04 Theodore Ts'o + + * gen_uuid.c (uuid_generate_time): Mask off the timestamp to avoid + a Y8.8888K problem. + 2004-04-03 Theodore Ts'o * Makefile.in: Update the modtime even if subst doesn't need to diff --git a/lib/uuid/gen_uuid.c b/lib/uuid/gen_uuid.c index 349364964..30d6202e3 100644 --- a/lib/uuid/gen_uuid.c +++ b/lib/uuid/gen_uuid.c @@ -283,7 +283,7 @@ void uuid_generate_time(uuid_t out) get_clock(&clock_mid, &uu.time_low, &uu.clock_seq); uu.clock_seq |= 0x8000; uu.time_mid = (uint16_t) clock_mid; - uu.time_hi_and_version = (clock_mid >> 16) | 0x1000; + uu.time_hi_and_version = ((clock_mid >> 16) & 0x0FFF) | 0x1000; memcpy(uu.node, node_id, 6); uuid_pack(&uu, out); }