From b9fb3067822c0a347905db81af0496743733fad5 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Fri, 24 Jul 2015 19:55:15 -0500 Subject: Promote hostid. --- toys/other/hostid.c | 23 +++++++++++++++++++++++ toys/pending/hostid.c | 23 ----------------------- 2 files changed, 23 insertions(+), 23 deletions(-) create mode 100644 toys/other/hostid.c delete mode 100644 toys/pending/hostid.c (limited to 'toys') diff --git a/toys/other/hostid.c b/toys/other/hostid.c new file mode 100644 index 00000000..883ac3ca --- /dev/null +++ b/toys/other/hostid.c @@ -0,0 +1,23 @@ +/* hostid.c - Print the numeric identifier for the current host. + * + * Copyright 2015 Ranjan Kumar + * + * No Standard. + +USE_HOSTID(NEWTOY(hostid, ">0", TOYFLAG_USR|TOYFLAG_BIN)) + +config HOSTID + bool "hostid" + default y + help + usage: hostid + + Print the numeric identifier for the current host. +*/ +#define FOR_hostid +#include "toys.h" + +void hostid_main(void) +{ + xprintf("%08lx\n", gethostid()); +} diff --git a/toys/pending/hostid.c b/toys/pending/hostid.c deleted file mode 100644 index feef61bf..00000000 --- a/toys/pending/hostid.c +++ /dev/null @@ -1,23 +0,0 @@ -/* hostid.c - Print the numeric identifier for the current host. - * - * Copyright 2015 Ranjan Kumar - * - * No Standard. - -USE_HOSTID(NEWTOY(hostid, ">0", TOYFLAG_USR|TOYFLAG_BIN)) - -config HOSTID - bool "hostid" - default n - help - usage: hostid - - Print the numeric identifier for the current host. -*/ -#define FOR_hostid -#include "toys.h" - -void hostid_main(void) -{ - xprintf("%08lx\n", gethostid()); -} -- cgit v1.2.3