blob: feef61bfafe98030d59d5c3f3ee15122b17637d5 [file] [log] [blame] [edit]
/* hostid.c - Print the numeric identifier for the current host.
*
* Copyright 2015 Ranjan Kumar <ranjankumar.bth@gmail.com>
*
* 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());
}