projects
/
oweals
/
busybox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ftpd: do not use nasty tricks for re-execing if we are on MMU machine.
[oweals/busybox.git]
/
coreutils
/
hostid.c
diff --git
a/coreutils/hostid.c
b/coreutils/hostid.c
index 65447aa635519d5df594e56ac7b680f58be67b33..2794510a7969e316ef3281a971f0c55ba937371a 100644
(file)
--- a/
coreutils/hostid.c
+++ b/
coreutils/hostid.c
@@
-9,11
+9,12
@@
/* BB_AUDIT SUSv3 N/A -- Matches GNU behavior. */
/* BB_AUDIT SUSv3 N/A -- Matches GNU behavior. */
-#include <stdlib.h>
-#include <unistd.h>
-#include "busybox.h"
+#include "libbb.h"
-int hostid_main(int argc, char ATTRIBUTE_UNUSED **argv)
+/* This is a NOFORK applet. Be very careful! */
+
+int hostid_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+int hostid_main(int argc, char **argv UNUSED_PARAM)
{
if (argc > 1) {
bb_show_usage();
{
if (argc > 1) {
bb_show_usage();
@@
-21,5
+22,5
@@
int hostid_main(int argc, char ATTRIBUTE_UNUSED **argv)
printf("%lx\n", gethostid());
printf("%lx\n", gethostid());
-
fflush_stdout_and_exit(EXIT_SUCCESS
);
+
return fflush(stdout
);
}
}