From 6bce3be4a3fcb1c3b01d86ffaec2b605c692822d Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Mon, 26 Dec 2016 12:10:29 -0600 Subject: Move hostid to toys/example and have it "default n". A "globally unique 32 bit number" is a concept the Linux world has outgrown. --- toys/example/hostid.c | 23 +++++++++++++++++++++++ toys/other/hostid.c | 23 ----------------------- 2 files changed, 23 insertions(+), 23 deletions(-) create mode 100644 toys/example/hostid.c delete mode 100644 toys/other/hostid.c diff --git a/toys/example/hostid.c b/toys/example/hostid.c new file mode 100644 index 00000000..feef61bf --- /dev/null +++ b/toys/example/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 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()); +} diff --git a/toys/other/hostid.c b/toys/other/hostid.c deleted file mode 100644 index 883ac3ca..00000000 --- a/toys/other/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 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()); -} -- cgit v1.2.3