OSDN Git Service

am 7e612cb8: (-s ours) am f41c7e0b: Merge remote-tracking branch \'toybox/master...
[android-x86/external-toybox.git] / toys / other / hostid.c
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
20 void hostid_main(void)
21 {
22   xprintf("%08lx\n", gethostid());
23 }