1 |
commit: 20035210bdf5d5729734457f35f5f32a53a5b3ad |
2 |
Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com> |
3 |
AuthorDate: Thu Jul 14 17:13:17 2016 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jul 14 17:13:17 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=20035210 |
7 |
|
8 |
make variable aflag a boolean show_all |
9 |
|
10 |
src/rc/rc-status.c | 10 +++++----- |
11 |
1 file changed, 5 insertions(+), 5 deletions(-) |
12 |
|
13 |
diff --git a/src/rc/rc-status.c b/src/rc/rc-status.c |
14 |
index 5018662..a0a2fce 100644 |
15 |
--- a/src/rc/rc-status.c |
16 |
+++ b/src/rc/rc-status.c |
17 |
@@ -176,9 +176,9 @@ print_stacked_services(const char *runlevel) |
18 |
int main(int argc, char **argv) |
19 |
{ |
20 |
RC_STRING *s, *l, *t, *level; |
21 |
- |
22 |
+ bool show_all = false; |
23 |
char *p, *runlevel = NULL; |
24 |
- int opt, aflag = 0, retval = 0; |
25 |
+ int opt, retval = 0; |
26 |
|
27 |
test_crashed = _rc_can_find_pids(); |
28 |
|
29 |
@@ -187,7 +187,7 @@ int main(int argc, char **argv) |
30 |
(int *) 0)) != -1) |
31 |
switch (opt) { |
32 |
case 'a': |
33 |
- aflag++; |
34 |
+ show_all = true; |
35 |
levels = rc_runlevel_list(); |
36 |
break; |
37 |
case 'c': |
38 |
@@ -265,7 +265,7 @@ int main(int argc, char **argv) |
39 |
services = NULL; |
40 |
} |
41 |
|
42 |
- if (aflag || argc < 2) { |
43 |
+ if (show_all || argc < 2) { |
44 |
/* Show hotplugged services */ |
45 |
print_level("Dynamic", "hotplugged"); |
46 |
services = rc_services_in_state(RC_SERVICE_HOTPLUGGED); |
47 |
@@ -274,7 +274,7 @@ int main(int argc, char **argv) |
48 |
services = NULL; |
49 |
|
50 |
/* Show manually started and unassigned depended services */ |
51 |
- if (aflag) { |
52 |
+ if (show_all) { |
53 |
rc_stringlist_free(levels); |
54 |
levels = rc_stringlist_new(); |
55 |
if (!runlevel) |