diff options
Diffstat (limited to 'coreutils/hostid.c')
-rw-r--r-- | coreutils/hostid.c | 12 |
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 | ||
28 | extern int hostid_main(int argc, char **argv) | 29 | extern 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 | } |