aboutsummaryrefslogtreecommitdiff
path: root/miscutils
diff options
context:
space:
mode:
Diffstat (limited to 'miscutils')
-rw-r--r--miscutils/chrt.c1
-rw-r--r--miscutils/devfsd.c10
-rw-r--r--miscutils/runlevel.c12
3 files changed, 11 insertions, 12 deletions
diff --git a/miscutils/chrt.c b/miscutils/chrt.c
index 8a4b78fc4..d549708b4 100644
--- a/miscutils/chrt.c
+++ b/miscutils/chrt.c
@@ -6,7 +6,6 @@
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
*/
-#include <unistd.h>
#include <sched.h>
#include <getopt.h> /* optind */
#include "libbb.h"
diff --git a/miscutils/devfsd.c b/miscutils/devfsd.c
index 994b80e76..ad934a3a4 100644
--- a/miscutils/devfsd.c
+++ b/miscutils/devfsd.c
@@ -54,15 +54,15 @@
Richard Gooch, c/o ATNF, P. O. Box 76, Epping, N.S.W., 2121, Australia.
*/
-#include "libbb.h"
-#include "xregex.h"
-#include <sys/wait.h>
-#include <sys/ioctl.h>
-#include <sys/socket.h>
+//#include <sys/wait.h>
+//#include <sys/ioctl.h>
+//#include <sys/socket.h>
#include <sys/un.h>
#include <dirent.h>
#include <syslog.h>
#include <sys/sysmacros.h>
+#include "libbb.h"
+#include "xregex.h"
/* Various defines taken from linux/major.h */
diff --git a/miscutils/runlevel.c b/miscutils/runlevel.c
index f7d55de0f..0aabfb024 100644
--- a/miscutils/runlevel.c
+++ b/miscutils/runlevel.c
@@ -12,11 +12,8 @@
* initially busyboxified by Bernhard Fischer
*/
-#include "libbb.h"
-#include <stdio.h>
#include <utmp.h>
-#include <time.h>
-#include <stdlib.h>
+#include "libbb.h"
int runlevel_main(int argc, char **argv);
int runlevel_main(int argc, char **argv)
@@ -32,12 +29,15 @@ int runlevel_main(int argc, char **argv)
prev = ut->ut_pid / 256;
if (prev == 0) prev = 'N';
printf("%c %c\n", prev, ut->ut_pid % 256);
- endutent();
+ if (ENABLE_FEATURE_CLEAN_UP)
+ endutent();
return 0;
}
}
puts("unknown");
- endutent();
+
+ if (ENABLE_FEATURE_CLEAN_UP)
+ endutent();
return 1;
}