diff options
author | Rob Landley <rob@landley.net> | 2018-05-03 19:09:05 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2018-05-03 19:09:05 -0500 |
commit | 828fc9c8be7e68a901e4fe79504a67cb6c9c33e8 (patch) | |
tree | 0f3549766c074214c243d254579f4b5f428b3622 /toys/other | |
parent | ec66213424e671c70d1d8dd3675b85ae24d10e5f (diff) | |
download | toybox-828fc9c8be7e68a901e4fe79504a67cb6c9c33e8.tar.gz |
Promote uuidgen.
Diffstat (limited to 'toys/other')
-rw-r--r-- | toys/other/uuidgen.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/toys/other/uuidgen.c b/toys/other/uuidgen.c new file mode 100644 index 00000000..4cfebe99 --- /dev/null +++ b/toys/other/uuidgen.c @@ -0,0 +1,25 @@ +/* uuidgen.c - Create a new random UUID + * + * Copyright 2018 The Android Open Source Project + * + * UUID RFC: https://tools.ietf.org/html/rfc4122 + +USE_UUIDGEN(NEWTOY(uuidgen, ">0r(random)", TOYFLAG_USR|TOYFLAG_BIN)) + +config UUIDGEN + bool "uuidgen" + default y + help + usage: uuidgen + + Create and print a new RFC4122 random UUID. +*/ + +#define FOR_uuidgen +#include "toys.h" + +void uuidgen_main(void) +{ + create_uuid(toybuf); + puts(show_uuid(toybuf)); +} |