1 /* hostid.c - Print the numeric identifier for the current host.
2  *
3  * Copyright 2015 Ranjan Kumar <ranjankumar.bth@gmail.com>
4  *
5  * No Standard.
6 
7 USE_HOSTID(NEWTOY(hostid, ">0", TOYFLAG_USR|TOYFLAG_BIN))
8 
9 config HOSTID
10   bool "hostid"
11   default y
12   help
13     usage: hostid
14 
15     Print the numeric identifier for the current host.
16 */
17 #define FOR_hostid
18 #include "toys.h"
19 
hostid_main(void)20 void hostid_main(void)
21 {
22   xprintf("%08lx\n", gethostid());
23 }
24