aboutsummaryrefslogtreecommitdiff
path: root/coreutils/hostid.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/hostid.c')
-rw-r--r--coreutils/hostid.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/coreutils/hostid.c b/coreutils/hostid.c
index 49409b9de..5c1a4e086 100644
--- a/coreutils/hostid.c
+++ b/coreutils/hostid.c
@@ -9,6 +9,17 @@
9 9
10/* BB_AUDIT SUSv3 N/A -- Matches GNU behavior. */ 10/* BB_AUDIT SUSv3 N/A -- Matches GNU behavior. */
11 11
12//config:config HOSTID
13//config: bool "hostid"
14//config: default y
15//config: help
16//config: hostid prints the numeric identifier (in hexadecimal) for
17//config: the current host.
18
19//applet:IF_HOSTID(APPLET_NOFORK(hostid, hostid, BB_DIR_USR_BIN, BB_SUID_DROP, hostid))
20
21//kbuild:lib-$(CONFIG_HOSTID) += hostid.o
22
12//usage:#define hostid_trivial_usage 23//usage:#define hostid_trivial_usage
13//usage: "" 24//usage: ""
14//usage:#define hostid_full_usage "\n\n" 25//usage:#define hostid_full_usage "\n\n"
@@ -25,7 +36,7 @@ int hostid_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
25 bb_show_usage(); 36 bb_show_usage();
26 } 37 }
27 38
28 printf("%lx\n", gethostid()); 39 printf("%08lx\n", gethostid());
29 40
30 return fflush_all(); 41 return fflush_all();
31} 42}