X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=coreutils%2Fhostid.c;h=2794510a7969e316ef3281a971f0c55ba937371a;hb=5b492ee87614632e7bf5cd68fe0ce87dad30002a;hp=65447aa635519d5df594e56ac7b680f58be67b33;hpb=f0ed376eda5d5c25d270e5100a881fb2d801bee6;p=oweals%2Fbusybox.git diff --git a/coreutils/hostid.c b/coreutils/hostid.c index 65447aa63..2794510a7 100644 --- a/coreutils/hostid.c +++ b/coreutils/hostid.c @@ -9,11 +9,12 @@ /* BB_AUDIT SUSv3 N/A -- Matches GNU behavior. */ -#include -#include -#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(); @@ -21,5 +22,5 @@ int hostid_main(int argc, char ATTRIBUTE_UNUSED **argv) printf("%lx\n", gethostid()); - fflush_stdout_and_exit(EXIT_SUCCESS); + return fflush(stdout); }