diff options
Diffstat (limited to 'e2fsprogs/uuid')
-rw-r--r-- | e2fsprogs/uuid/compare.c | 4 | ||||
-rw-r--r-- | e2fsprogs/uuid/gen_uuid.c | 24 | ||||
-rw-r--r-- | e2fsprogs/uuid/pack.c | 4 | ||||
-rw-r--r-- | e2fsprogs/uuid/parse.c | 8 | ||||
-rw-r--r-- | e2fsprogs/uuid/unpack.c | 4 | ||||
-rw-r--r-- | e2fsprogs/uuid/unparse.c | 8 | ||||
-rw-r--r-- | e2fsprogs/uuid/uuid.h | 8 | ||||
-rw-r--r-- | e2fsprogs/uuid/uuidP.h | 4 | ||||
-rw-r--r-- | e2fsprogs/uuid/uuid_time.c | 16 |
9 files changed, 40 insertions, 40 deletions
diff --git a/e2fsprogs/uuid/compare.c b/e2fsprogs/uuid/compare.c index 83afeafbf..94c32b1d3 100644 --- a/e2fsprogs/uuid/compare.c +++ b/e2fsprogs/uuid/compare.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * compare.c --- compare whether or not two UUID's are the same | 2 | * compare.c --- compare whether or not two UUID's are the same |
3 | * | 3 | * |
4 | * Returns 0 if the two UUID's are different, and 1 if they are the same. | 4 | * Returns 0 if the two UUID's are different, and 1 if they are the same. |
5 | * | 5 | * |
6 | * Copyright (C) 1996, 1997 Theodore Ts'o. | 6 | * Copyright (C) 1996, 1997 Theodore Ts'o. |
7 | * | 7 | * |
8 | * %Begin-Header% | 8 | * %Begin-Header% |
@@ -18,7 +18,7 @@ | |||
18 | * 3. The name of the author may not be used to endorse or promote | 18 | * 3. The name of the author may not be used to endorse or promote |
19 | * products derived from this software without specific prior | 19 | * products derived from this software without specific prior |
20 | * written permission. | 20 | * written permission. |
21 | * | 21 | * |
22 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED | 22 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED |
23 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | 23 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
24 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF | 24 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF |
diff --git a/e2fsprogs/uuid/gen_uuid.c b/e2fsprogs/uuid/gen_uuid.c index 52328cfc4..fca3ebe91 100644 --- a/e2fsprogs/uuid/gen_uuid.c +++ b/e2fsprogs/uuid/gen_uuid.c | |||
@@ -16,7 +16,7 @@ | |||
16 | * 3. The name of the author may not be used to endorse or promote | 16 | * 3. The name of the author may not be used to endorse or promote |
17 | * products derived from this software without specific prior | 17 | * products derived from this software without specific prior |
18 | * written permission. | 18 | * written permission. |
19 | * | 19 | * |
20 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED | 20 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED |
21 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | 21 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
22 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF | 22 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF |
@@ -63,8 +63,8 @@ | |||
63 | #include "uuidP.h" | 63 | #include "uuidP.h" |
64 | 64 | ||
65 | #ifdef HAVE_SRANDOM | 65 | #ifdef HAVE_SRANDOM |
66 | #define srand(x) srandom(x) | 66 | #define srand(x) srandom(x) |
67 | #define rand() random() | 67 | #define rand() random() |
68 | #endif | 68 | #endif |
69 | 69 | ||
70 | static int get_random_fd(void) | 70 | static int get_random_fd(void) |
@@ -111,7 +111,7 @@ static void get_random_bytes(void *buf, int nbytes) | |||
111 | lose_counter = 0; | 111 | lose_counter = 0; |
112 | } | 112 | } |
113 | } | 113 | } |
114 | 114 | ||
115 | /* | 115 | /* |
116 | * We do this all the time, but this is the only source of | 116 | * We do this all the time, but this is the only source of |
117 | * randomness if /dev/random/urandom is out to lunch. | 117 | * randomness if /dev/random/urandom is out to lunch. |
@@ -127,12 +127,12 @@ static void get_random_bytes(void *buf, int nbytes) | |||
127 | static int get_node_id(unsigned char *node_id) | 127 | static int get_node_id(unsigned char *node_id) |
128 | { | 128 | { |
129 | #ifdef HAVE_NET_IF_H | 129 | #ifdef HAVE_NET_IF_H |
130 | int sd; | 130 | int sd; |
131 | struct ifreq ifr, *ifrp; | 131 | struct ifreq ifr, *ifrp; |
132 | struct ifconf ifc; | 132 | struct ifconf ifc; |
133 | char buf[1024]; | 133 | char buf[1024]; |
134 | int n, i; | 134 | int n, i; |
135 | unsigned char *a; | 135 | unsigned char *a; |
136 | #ifdef HAVE_NET_IF_DL_H | 136 | #ifdef HAVE_NET_IF_DL_H |
137 | struct sockaddr_dl *sdlp; | 137 | struct sockaddr_dl *sdlp; |
138 | #endif | 138 | #endif |
@@ -140,7 +140,7 @@ static int get_node_id(unsigned char *node_id) | |||
140 | /* | 140 | /* |
141 | * BSD 4.4 defines the size of an ifreq to be | 141 | * BSD 4.4 defines the size of an ifreq to be |
142 | * max(sizeof(ifreq), sizeof(ifreq.ifr_name)+ifreq.ifr_addr.sa_len | 142 | * max(sizeof(ifreq), sizeof(ifreq.ifr_name)+ifreq.ifr_addr.sa_len |
143 | * However, under earlier systems, sa_len isn't present, so the size is | 143 | * However, under earlier systems, sa_len isn't present, so the size is |
144 | * just sizeof(struct ifreq) | 144 | * just sizeof(struct ifreq) |
145 | */ | 145 | */ |
146 | #ifdef HAVE_SA_LEN | 146 | #ifdef HAVE_SA_LEN |
@@ -214,9 +214,9 @@ static int get_clock(uint32_t *clock_high, uint32_t *clock_low, uint16_t *ret_cl | |||
214 | static int adjustment = 0; | 214 | static int adjustment = 0; |
215 | static struct timeval last = {0, 0}; | 215 | static struct timeval last = {0, 0}; |
216 | static uint16_t clock_seq; | 216 | static uint16_t clock_seq; |
217 | struct timeval tv; | 217 | struct timeval tv; |
218 | unsigned long long clock_reg; | 218 | unsigned long long clock_reg; |
219 | 219 | ||
220 | try_again: | 220 | try_again: |
221 | gettimeofday(&tv, 0); | 221 | gettimeofday(&tv, 0); |
222 | if ((last.tv_sec == 0) && (last.tv_usec == 0)) { | 222 | if ((last.tv_sec == 0) && (last.tv_usec == 0)) { |
@@ -240,7 +240,7 @@ try_again: | |||
240 | adjustment = 0; | 240 | adjustment = 0; |
241 | last = tv; | 241 | last = tv; |
242 | } | 242 | } |
243 | 243 | ||
244 | clock_reg = tv.tv_usec*10 + adjustment; | 244 | clock_reg = tv.tv_usec*10 + adjustment; |
245 | clock_reg += ((unsigned long long) tv.tv_sec)*10000000; | 245 | clock_reg += ((unsigned long long) tv.tv_sec)*10000000; |
246 | clock_reg += (((unsigned long long) 0x01B21DD2) << 32) + 0x13814000; | 246 | clock_reg += (((unsigned long long) 0x01B21DD2) << 32) + 0x13814000; |
diff --git a/e2fsprogs/uuid/pack.c b/e2fsprogs/uuid/pack.c index 1013886e5..9d733f000 100644 --- a/e2fsprogs/uuid/pack.c +++ b/e2fsprogs/uuid/pack.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Internal routine for packing UUID's | 2 | * Internal routine for packing UUID's |
3 | * | 3 | * |
4 | * Copyright (C) 1996, 1997 Theodore Ts'o. | 4 | * Copyright (C) 1996, 1997 Theodore Ts'o. |
5 | * | 5 | * |
6 | * %Begin-Header% | 6 | * %Begin-Header% |
@@ -16,7 +16,7 @@ | |||
16 | * 3. The name of the author may not be used to endorse or promote | 16 | * 3. The name of the author may not be used to endorse or promote |
17 | * products derived from this software without specific prior | 17 | * products derived from this software without specific prior |
18 | * written permission. | 18 | * written permission. |
19 | * | 19 | * |
20 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED | 20 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED |
21 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | 21 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
22 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF | 22 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF |
diff --git a/e2fsprogs/uuid/parse.c b/e2fsprogs/uuid/parse.c index 07b894d11..21b29498e 100644 --- a/e2fsprogs/uuid/parse.c +++ b/e2fsprogs/uuid/parse.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * parse.c --- UUID parsing | 2 | * parse.c --- UUID parsing |
3 | * | 3 | * |
4 | * Copyright (C) 1996, 1997 Theodore Ts'o. | 4 | * Copyright (C) 1996, 1997 Theodore Ts'o. |
5 | * | 5 | * |
6 | * %Begin-Header% | 6 | * %Begin-Header% |
@@ -16,7 +16,7 @@ | |||
16 | * 3. The name of the author may not be used to endorse or promote | 16 | * 3. The name of the author may not be used to endorse or promote |
17 | * products derived from this software without specific prior | 17 | * products derived from this software without specific prior |
18 | * written permission. | 18 | * written permission. |
19 | * | 19 | * |
20 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED | 20 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED |
21 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | 21 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
22 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF | 22 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF |
@@ -42,7 +42,7 @@ | |||
42 | int uuid_parse(const char *in, uuid_t uu) | 42 | int uuid_parse(const char *in, uuid_t uu) |
43 | { | 43 | { |
44 | struct uuid uuid; | 44 | struct uuid uuid; |
45 | int i; | 45 | int i; |
46 | const char *cp; | 46 | const char *cp; |
47 | char buf[3]; | 47 | char buf[3]; |
48 | 48 | ||
@@ -73,7 +73,7 @@ int uuid_parse(const char *in, uuid_t uu) | |||
73 | buf[1] = *cp++; | 73 | buf[1] = *cp++; |
74 | uuid.node[i] = strtoul(buf, NULL, 16); | 74 | uuid.node[i] = strtoul(buf, NULL, 16); |
75 | } | 75 | } |
76 | 76 | ||
77 | uuid_pack(&uuid, uu); | 77 | uuid_pack(&uuid, uu); |
78 | return 0; | 78 | return 0; |
79 | } | 79 | } |
diff --git a/e2fsprogs/uuid/unpack.c b/e2fsprogs/uuid/unpack.c index d63589521..8f9c520c1 100644 --- a/e2fsprogs/uuid/unpack.c +++ b/e2fsprogs/uuid/unpack.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Internal routine for unpacking UUID | 2 | * Internal routine for unpacking UUID |
3 | * | 3 | * |
4 | * Copyright (C) 1996, 1997 Theodore Ts'o. | 4 | * Copyright (C) 1996, 1997 Theodore Ts'o. |
5 | * | 5 | * |
6 | * %Begin-Header% | 6 | * %Begin-Header% |
@@ -16,7 +16,7 @@ | |||
16 | * 3. The name of the author may not be used to endorse or promote | 16 | * 3. The name of the author may not be used to endorse or promote |
17 | * products derived from this software without specific prior | 17 | * products derived from this software without specific prior |
18 | * written permission. | 18 | * written permission. |
19 | * | 19 | * |
20 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED | 20 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED |
21 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | 21 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
22 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF | 22 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF |
diff --git a/e2fsprogs/uuid/unparse.c b/e2fsprogs/uuid/unparse.c index c0e08ef49..a95bbb042 100644 --- a/e2fsprogs/uuid/unparse.c +++ b/e2fsprogs/uuid/unparse.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * unparse.c -- convert a UUID to string | 2 | * unparse.c -- convert a UUID to string |
3 | * | 3 | * |
4 | * Copyright (C) 1996, 1997 Theodore Ts'o. | 4 | * Copyright (C) 1996, 1997 Theodore Ts'o. |
5 | * | 5 | * |
6 | * %Begin-Header% | 6 | * %Begin-Header% |
@@ -16,7 +16,7 @@ | |||
16 | * 3. The name of the author may not be used to endorse or promote | 16 | * 3. The name of the author may not be used to endorse or promote |
17 | * products derived from this software without specific prior | 17 | * products derived from this software without specific prior |
18 | * written permission. | 18 | * written permission. |
19 | * | 19 | * |
20 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED | 20 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED |
21 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | 21 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
22 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF | 22 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF |
@@ -36,10 +36,10 @@ | |||
36 | 36 | ||
37 | #include "uuidP.h" | 37 | #include "uuidP.h" |
38 | 38 | ||
39 | static const char *fmt_lower = | 39 | static const char *fmt_lower = |
40 | "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x"; | 40 | "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x"; |
41 | 41 | ||
42 | static const char *fmt_upper = | 42 | static const char *fmt_upper = |
43 | "%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X"; | 43 | "%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X"; |
44 | 44 | ||
45 | #ifdef UUID_UNPARSE_DEFAULT_UPPER | 45 | #ifdef UUID_UNPARSE_DEFAULT_UPPER |
diff --git a/e2fsprogs/uuid/uuid.h b/e2fsprogs/uuid/uuid.h index a05f1c690..cd97a5e78 100644 --- a/e2fsprogs/uuid/uuid.h +++ b/e2fsprogs/uuid/uuid.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Public include file for the UUID library | 2 | * Public include file for the UUID library |
3 | * | 3 | * |
4 | * Copyright (C) 1996, 1997, 1998 Theodore Ts'o. | 4 | * Copyright (C) 1996, 1997, 1998 Theodore Ts'o. |
5 | * | 5 | * |
6 | * %Begin-Header% | 6 | * %Begin-Header% |
@@ -16,7 +16,7 @@ | |||
16 | * 3. The name of the author may not be used to endorse or promote | 16 | * 3. The name of the author may not be used to endorse or promote |
17 | * products derived from this software without specific prior | 17 | * products derived from this software without specific prior |
18 | * written permission. | 18 | * written permission. |
19 | * | 19 | * |
20 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED | 20 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED |
21 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | 21 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
22 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF | 22 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF |
@@ -42,8 +42,8 @@ | |||
42 | typedef unsigned char uuid_t[16]; | 42 | typedef unsigned char uuid_t[16]; |
43 | 43 | ||
44 | /* UUID Variant definitions */ | 44 | /* UUID Variant definitions */ |
45 | #define UUID_VARIANT_NCS 0 | 45 | #define UUID_VARIANT_NCS 0 |
46 | #define UUID_VARIANT_DCE 1 | 46 | #define UUID_VARIANT_DCE 1 |
47 | #define UUID_VARIANT_MICROSOFT 2 | 47 | #define UUID_VARIANT_MICROSOFT 2 |
48 | #define UUID_VARIANT_OTHER 3 | 48 | #define UUID_VARIANT_OTHER 3 |
49 | 49 | ||
diff --git a/e2fsprogs/uuid/uuidP.h b/e2fsprogs/uuid/uuidP.h index d2e1a450a..9d30ce2f8 100644 --- a/e2fsprogs/uuid/uuidP.h +++ b/e2fsprogs/uuid/uuidP.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * uuid.h -- private header file for uuids | 2 | * uuid.h -- private header file for uuids |
3 | * | 3 | * |
4 | * Copyright (C) 1996, 1997 Theodore Ts'o. | 4 | * Copyright (C) 1996, 1997 Theodore Ts'o. |
5 | * | 5 | * |
6 | * %Begin-Header% | 6 | * %Begin-Header% |
@@ -16,7 +16,7 @@ | |||
16 | * 3. The name of the author may not be used to endorse or promote | 16 | * 3. The name of the author may not be used to endorse or promote |
17 | * products derived from this software without specific prior | 17 | * products derived from this software without specific prior |
18 | * written permission. | 18 | * written permission. |
19 | * | 19 | * |
20 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED | 20 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED |
21 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | 21 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
22 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF | 22 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF |
diff --git a/e2fsprogs/uuid/uuid_time.c b/e2fsprogs/uuid/uuid_time.c index d5f992b39..9ff3607d8 100644 --- a/e2fsprogs/uuid/uuid_time.c +++ b/e2fsprogs/uuid/uuid_time.c | |||
@@ -1,8 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * uuid_time.c --- Interpret the time field from a uuid. This program | 2 | * uuid_time.c --- Interpret the time field from a uuid. This program |
3 | * violates the UUID abstraction barrier by reaching into the guts | 3 | * violates the UUID abstraction barrier by reaching into the guts |
4 | * of a UUID and interpreting it. | 4 | * of a UUID and interpreting it. |
5 | * | 5 | * |
6 | * Copyright (C) 1998, 1999 Theodore Ts'o. | 6 | * Copyright (C) 1998, 1999 Theodore Ts'o. |
7 | * | 7 | * |
8 | * %Begin-Header% | 8 | * %Begin-Header% |
@@ -18,7 +18,7 @@ | |||
18 | * 3. The name of the author may not be used to endorse or promote | 18 | * 3. The name of the author may not be used to endorse or promote |
19 | * products derived from this software without specific prior | 19 | * products derived from this software without specific prior |
20 | * written permission. | 20 | * written permission. |
21 | * | 21 | * |
22 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED | 22 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED |
23 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | 23 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
24 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF | 24 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF |
@@ -51,7 +51,7 @@ time_t uuid_time(const uuid_t uu, struct timeval *ret_tv) | |||
51 | unsigned long long clock_reg; | 51 | unsigned long long clock_reg; |
52 | 52 | ||
53 | uuid_unpack(uu, &uuid); | 53 | uuid_unpack(uu, &uuid); |
54 | 54 | ||
55 | high = uuid.time_mid | ((uuid.time_hi_and_version & 0xFFF) << 16); | 55 | high = uuid.time_mid | ((uuid.time_hi_and_version & 0xFFF) << 16); |
56 | clock_reg = uuid.time_low | ((unsigned long long) high << 32); | 56 | clock_reg = uuid.time_low | ((unsigned long long) high << 32); |
57 | 57 | ||
@@ -69,7 +69,7 @@ int uuid_type(const uuid_t uu) | |||
69 | { | 69 | { |
70 | struct uuid uuid; | 70 | struct uuid uuid; |
71 | 71 | ||
72 | uuid_unpack(uu, &uuid); | 72 | uuid_unpack(uu, &uuid); |
73 | return ((uuid.time_hi_and_version >> 12) & 0xF); | 73 | return ((uuid.time_hi_and_version >> 12) & 0xF); |
74 | } | 74 | } |
75 | 75 | ||
@@ -78,7 +78,7 @@ int uuid_variant(const uuid_t uu) | |||
78 | struct uuid uuid; | 78 | struct uuid uuid; |
79 | int var; | 79 | int var; |
80 | 80 | ||
81 | uuid_unpack(uu, &uuid); | 81 | uuid_unpack(uu, &uuid); |
82 | var = uuid.clock_seq; | 82 | var = uuid.clock_seq; |
83 | 83 | ||
84 | if ((var & 0x8000) == 0) | 84 | if ((var & 0x8000) == 0) |
@@ -105,7 +105,7 @@ static const char *variant_string(int variant) | |||
105 | } | 105 | } |
106 | } | 106 | } |
107 | 107 | ||
108 | 108 | ||
109 | int | 109 | int |
110 | main(int argc, char **argv) | 110 | main(int argc, char **argv) |
111 | { | 111 | { |
@@ -155,7 +155,7 @@ main(int argc, char **argv) | |||
155 | } | 155 | } |
156 | printf("UUID time is: (%ld, %ld): %s\n", tv.tv_sec, tv.tv_usec, | 156 | printf("UUID time is: (%ld, %ld): %s\n", tv.tv_sec, tv.tv_usec, |
157 | ctime(&time_reg)); | 157 | ctime(&time_reg)); |
158 | 158 | ||
159 | return 0; | 159 | return 0; |
160 | } | 160 | } |
161 | #endif | 161 | #endif |