10f66f451Sopenharmony_ci/* uuidgen.c - Create a new random UUID 20f66f451Sopenharmony_ci * 30f66f451Sopenharmony_ci * Copyright 2018 The Android Open Source Project 40f66f451Sopenharmony_ci * 50f66f451Sopenharmony_ci * UUID RFC: https://tools.ietf.org/html/rfc4122 60f66f451Sopenharmony_ci 70f66f451Sopenharmony_ciUSE_UUIDGEN(NEWTOY(uuidgen, ">0r(random)", TOYFLAG_USR|TOYFLAG_BIN)) 80f66f451Sopenharmony_ci 90f66f451Sopenharmony_ciconfig UUIDGEN 100f66f451Sopenharmony_ci bool "uuidgen" 110f66f451Sopenharmony_ci default y 120f66f451Sopenharmony_ci help 130f66f451Sopenharmony_ci usage: uuidgen 140f66f451Sopenharmony_ci 150f66f451Sopenharmony_ci Create and print a new RFC4122 random UUID. 160f66f451Sopenharmony_ci*/ 170f66f451Sopenharmony_ci 180f66f451Sopenharmony_ci#define FOR_uuidgen 190f66f451Sopenharmony_ci#include "toys.h" 200f66f451Sopenharmony_ci 210f66f451Sopenharmony_civoid uuidgen_main(void) 220f66f451Sopenharmony_ci{ 230f66f451Sopenharmony_ci create_uuid(toybuf); 240f66f451Sopenharmony_ci puts(show_uuid(toybuf)); 250f66f451Sopenharmony_ci} 26