From 828fc9c8be7e68a901e4fe79504a67cb6c9c33e8 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Thu, 3 May 2018 19:09:05 -0500 Subject: Promote uuidgen. --- toys/other/uuidgen.c | 25 +++++++++++++++++++++++++ toys/pending/uuidgen.c | 25 ------------------------- 2 files changed, 25 insertions(+), 25 deletions(-) create mode 100644 toys/other/uuidgen.c delete mode 100644 toys/pending/uuidgen.c (limited to 'toys') 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)); +} diff --git a/toys/pending/uuidgen.c b/toys/pending/uuidgen.c deleted file mode 100644 index 682dec4c..00000000 --- a/toys/pending/uuidgen.c +++ /dev/null @@ -1,25 +0,0 @@ -/* 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 n - 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)); -} -- cgit v1.2.3