diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-09-23 16:01:09 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-09-23 16:01:09 +0000 |
commit | c290563319b61c8230deca52ab625d8dc335e2d3 (patch) | |
tree | 0961ae48901bd3defbcc6bbd5cd57bd90a3f849e /miscutils | |
parent | c1876d7364a260e06cd23a3255b9058240527b02 (diff) | |
download | busybox-w32-c290563319b61c8230deca52ab625d8dc335e2d3.tar.gz busybox-w32-c290563319b61c8230deca52ab625d8dc335e2d3.tar.bz2 busybox-w32-c290563319b61c8230deca52ab625d8dc335e2d3.zip |
remove unneeded #includes, fix indentation
Diffstat (limited to 'miscutils')
-rw-r--r-- | miscutils/runlevel.c | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/miscutils/runlevel.c b/miscutils/runlevel.c index a042a7012..91d49fa55 100644 --- a/miscutils/runlevel.c +++ b/miscutils/runlevel.c | |||
@@ -20,24 +20,23 @@ | |||
20 | 20 | ||
21 | int runlevel_main(int argc, char *argv[]) | 21 | int runlevel_main(int argc, char *argv[]) |
22 | { | 22 | { |
23 | struct utmp *ut; | 23 | struct utmp *ut; |
24 | char prev; | 24 | char prev; |
25 | 25 | ||
26 | if (argc > 1) utmpname(argv[1]); | 26 | if (argc > 1) utmpname(argv[1]); |
27 | 27 | ||
28 | setutent(); | 28 | setutent(); |
29 | while ((ut = getutent()) != NULL) { | 29 | while ((ut = getutent()) != NULL) { |
30 | if (ut->ut_type == RUN_LVL) { | 30 | if (ut->ut_type == RUN_LVL) { |
31 | prev = ut->ut_pid / 256; | 31 | prev = ut->ut_pid / 256; |
32 | if (prev == 0) prev = 'N'; | 32 | if (prev == 0) prev = 'N'; |
33 | printf("%c %c\n", prev, ut->ut_pid % 256); | 33 | printf("%c %c\n", prev, ut->ut_pid % 256); |
34 | endutent(); | 34 | endutent(); |
35 | return (0); | 35 | return 0; |
36 | } | ||
36 | } | 37 | } |
37 | } | ||
38 | 38 | ||
39 | printf("unknown\n"); | 39 | puts("unknown"); |
40 | endutent(); | 40 | endutent(); |
41 | return (1); | 41 | return 1; |
42 | } | 42 | } |
43 | |||