aboutsummaryrefslogtreecommitdiff
path: root/coreutils/hostid.c
diff options
context:
space:
mode:
authormjn3 <mjn3@69ca8d6d-28ef-0310-b511-8ec308f3f277>2003-03-19 09:13:01 +0000
committermjn3 <mjn3@69ca8d6d-28ef-0310-b511-8ec308f3f277>2003-03-19 09:13:01 +0000
commite901c15d890dbbdce4c086963cb1513653fc46b5 (patch)
treea318d0f03aa076c74b576ea45dc543a5669e8e91 /coreutils/hostid.c
parent40758c00616c3b2c85d83eb4afdeb04b1f65c9f1 (diff)
downloadbusybox-w32-e901c15d890dbbdce4c086963cb1513653fc46b5.tar.gz
busybox-w32-e901c15d890dbbdce4c086963cb1513653fc46b5.tar.bz2
busybox-w32-e901c15d890dbbdce4c086963cb1513653fc46b5.zip
Major coreutils update.
git-svn-id: svn://busybox.net/trunk/busybox@6751 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'coreutils/hostid.c')
-rw-r--r--coreutils/hostid.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/coreutils/hostid.c b/coreutils/hostid.c
index 68a2cc659..917dc223e 100644
--- a/coreutils/hostid.c
+++ b/coreutils/hostid.c
@@ -20,13 +20,19 @@
20 * 20 *
21 */ 21 */
22 22
23#include <stdio.h> 23/* BB_AUDIT SUSv3 N/A -- Matches GNU behavior. */
24
24#include <stdlib.h> 25#include <stdlib.h>
25#include <unistd.h> 26#include <unistd.h>
26#include "busybox.h" 27#include "busybox.h"
27 28
28extern int hostid_main(int argc, char **argv) 29extern int hostid_main(int argc, char **argv)
29{ 30{
30 printf("%lx\n", gethostid()); 31 if (argc > 1) {
31 return EXIT_SUCCESS; 32 bb_show_usage();
33 }
34
35 bb_printf("%lx\n", gethostid());
36
37 bb_fflush_stdout_and_exit(EXIT_SUCCESS);
32} 38}