aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2016-07-14 12:13:17 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2016-07-14 12:13:17 -0500
commit20035210bdf5d5729734457f35f5f32a53a5b3ad (patch)
treec2f26ec8bb7d15e3f7e2565c41dbf12a437f05a2 /src
parent7f84b5d741c150cd159d5a3cda3ef532f0381826 (diff)
make variable aflag a boolean show_all
Diffstat (limited to 'src')
-rw-r--r--src/rc/rc-status.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/rc/rc-status.c b/src/rc/rc-status.c
index 5018662e..a0a2fcec 100644
--- a/src/rc/rc-status.c
+++ b/src/rc/rc-status.c
@@ -176,9 +176,9 @@ print_stacked_services(const char *runlevel)
int main(int argc, char **argv)
{
RC_STRING *s, *l, *t, *level;
-
+ bool show_all = false;
char *p, *runlevel = NULL;
- int opt, aflag = 0, retval = 0;
+ int opt, retval = 0;
test_crashed = _rc_can_find_pids();
@@ -187,7 +187,7 @@ int main(int argc, char **argv)
(int *) 0)) != -1)
switch (opt) {
case 'a':
- aflag++;
+ show_all = true;
levels = rc_runlevel_list();
break;
case 'c':
@@ -265,7 +265,7 @@ int main(int argc, char **argv)
services = NULL;
}
- if (aflag || argc < 2) {
+ if (show_all || argc < 2) {
/* Show hotplugged services */
print_level("Dynamic", "hotplugged");
services = rc_services_in_state(RC_SERVICE_HOTPLUGGED);
@@ -274,7 +274,7 @@ int main(int argc, char **argv)
services = NULL;
/* Show manually started and unassigned depended services */
- if (aflag) {
+ if (show_all) {
rc_stringlist_free(levels);
levels = rc_stringlist_new();
if (!runlevel)