2 * gen_uuid.c --- generate a DCE-compatible uuid
4 * Copyright (C) 1999, Andreas Dilger and Theodore Ts'o
7 * This file may be redistributed under the terms of the GNU Public
16 #include "uuid/uuid.h"
18 #define DO_TYPE_TIME 1
19 #define DO_TYPE_RANDOM 2
21 void usage(const char *progname)
23 fprintf(stderr, "Usage: %s [-r] [-t]\n", progname);
28 main (int argc, char *argv[])
35 while ((c = getopt (argc, argv, "tr")) != EOF)
38 do_type = DO_TYPE_TIME;
41 do_type = DO_TYPE_RANDOM;
49 uuid_generate_time(uu);
52 uuid_generate_random(uu);
59 uuid_unparse(uu, str);