2 * parse.c --- UUID parsing
4 * Copyright (C) 1996, 1997 Theodore Ts'o.
7 * This file may be redistributed under the terms of the GNU
8 * Library General Public License.
19 int uuid_parse(const char *in, uuid_t uu)
28 for (i=0, cp = in; i <= 36; i++,cp++) {
29 if ((i == 8) || (i == 13) || (i == 18) ||
39 uuid.time_low = strtoul(in, NULL, 16);
40 uuid.time_mid = strtoul(in+9, NULL, 16);
41 uuid.time_hi_and_version = strtoul(in+14, NULL, 16);
42 uuid.clock_seq = strtoul(in+19, NULL, 16);
45 for (i=0; i < 6; i++) {
48 uuid.node[i] = strtoul(buf, NULL, 16);