aboutsummaryrefslogtreecommitdiff
path: root/miscutils/runlevel.c
diff options
context:
space:
mode:
authorGravatar Denis Vlasenko <vda.linux@googlemail.com>2007-05-31 22:42:12 +0000
committerGravatar Denis Vlasenko <vda.linux@googlemail.com>2007-05-31 22:42:12 +0000
commit9a7d38fe2448617df98ecaea7dbe6f3131088586 (patch)
tree5966d651dcb5588e24106791f9cd3647f358112b /miscutils/runlevel.c
parentfad2b86c9e7eaadb973b50a1bc0e2accc1a96cfd (diff)
downloadbusybox-9a7d38fe2448617df98ecaea7dbe6f3131088586.tar.gz
busybox-9a7d38fe2448617df98ecaea7dbe6f3131088586.tar.bz2
delete tons of extra #includes
Diffstat (limited to 'miscutils/runlevel.c')
-rw-r--r--miscutils/runlevel.c12
1 files changed, 6 insertions, 6 deletions
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;
}