xref: /third_party/toybox/toys/other/uuidgen.c (revision 0f66f451)
1/* uuidgen.c - Create a new random UUID
2 *
3 * Copyright 2018 The Android Open Source Project
4 *
5 * UUID RFC: https://tools.ietf.org/html/rfc4122
6
7USE_UUIDGEN(NEWTOY(uuidgen, ">0r(random)", TOYFLAG_USR|TOYFLAG_BIN))
8
9config UUIDGEN
10  bool "uuidgen"
11  default y
12  help
13    usage: uuidgen
14
15    Create and print a new RFC4122 random UUID.
16*/
17
18#define FOR_uuidgen
19#include "toys.h"
20
21void uuidgen_main(void)
22{
23  create_uuid(toybuf);
24  puts(show_uuid(toybuf));
25}
26