diff options
author | Sami Kerola | 2014-05-24 19:41:08 +0200 |
---|---|---|
committer | Sami Kerola | 2014-05-26 17:42:49 +0200 |
commit | 6328799db1cad5ae63de182a75183d17a0777afd (patch) | |
tree | b667b719f4ae203b7581379497644da79d0662a4 /misc-utils/uuidgen.c | |
parent | uuidd: set options to be mutually exclusive (diff) | |
download | kernel-qcow2-util-linux-6328799db1cad5ae63de182a75183d17a0777afd.tar.gz kernel-qcow2-util-linux-6328799db1cad5ae63de182a75183d17a0777afd.tar.xz kernel-qcow2-util-linux-6328799db1cad5ae63de182a75183d17a0777afd.zip |
uuidgen: use type definitions from uuid.h
There is no need to re-invent wheel.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'misc-utils/uuidgen.c')
-rw-r--r-- | misc-utils/uuidgen.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/misc-utils/uuidgen.c b/misc-utils/uuidgen.c index 450e26a05..0c844d216 100644 --- a/misc-utils/uuidgen.c +++ b/misc-utils/uuidgen.c @@ -26,9 +26,6 @@ extern int optind; #include "c.h" #include "closestream.h" -#define DO_TYPE_TIME 1 -#define DO_TYPE_RANDOM 2 - static void __attribute__ ((__noreturn__)) usage(FILE * out) { fputs(_("\nUsage:\n"), out); @@ -68,10 +65,10 @@ main (int argc, char *argv[]) while ((c = getopt_long(argc, argv, "rtVh", longopts, NULL)) != -1) switch (c) { case 't': - do_type = DO_TYPE_TIME; + do_type = UUID_TYPE_DCE_TIME; break; case 'r': - do_type = DO_TYPE_RANDOM; + do_type = UUID_TYPE_DCE_RANDOM; break; case 'V': printf(UTIL_LINUX_VERSION); @@ -83,10 +80,10 @@ main (int argc, char *argv[]) } switch (do_type) { - case DO_TYPE_TIME: + case UUID_TYPE_DCE_TIME: uuid_generate_time(uu); break; - case DO_TYPE_RANDOM: + case UUID_TYPE_DCE_RANDOM: uuid_generate_random(uu); break; default: |