aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoranon <anon@anon.anon>2022-12-24 14:51:40 +0100
committerMike Frysinger <vapier@gmail.com>2023-02-15 22:51:40 -0500
commit476272be0ce404b211b1558c4d4aa6c5b4ff7344 (patch)
treef5c1a722a8b624e154db69ae2889a37d1c671697 /src
parent63a5ee3d8c75db0ce89a755264f0d871107668d3 (diff)
rc-status: all flags respect '-f'
Diffstat (limited to 'src')
-rw-r--r--src/rc-status/rc-status.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/rc-status/rc-status.c b/src/rc-status/rc-status.c
index ee6e7f00..695cbcee 100644
--- a/src/rc-status/rc-status.c
+++ b/src/rc-status/rc-status.c
@@ -65,8 +65,8 @@ const char * const longopts_help[] = {
longopts_help_COMMON
};
const char *usagestring = "" \
- "Usage: rc-status [options] -f ini <runlevel>...\n" \
- " or: rc-status [options] [-a | -c | -l | -m | -r | -s | -u]";
+ "Usage: rc-status [options] [-f ini] <runlevel>...\n" \
+ " or: rc-status [options] [-f ini] [-a | -c | -l | -m | -r | -s | -u]";
static RC_DEPTREE *deptree;
static RC_STRINGLIST *types;
@@ -316,7 +316,7 @@ int main(int argc, char **argv)
free(s->value);
free(s);
}
- print_services(NULL, services, FORMAT_DEFAULT);
+ print_services(NULL, services, format);
goto exit;
case 'r':
runlevel = rc_runlevel_get();
@@ -328,12 +328,12 @@ int main(int argc, char **argv)
TAILQ_FOREACH_SAFE(s, services, entries, t)
if (!rc_service_value_get(s->value, "child_pid"))
TAILQ_REMOVE(services, s, entries);
- print_services(NULL, services, FORMAT_DEFAULT);
+ print_services(NULL, services, format);
goto exit;
/* NOTREACHED */
case 's':
services = rc_services_in_runlevel(NULL);
- print_services(NULL, services, FORMAT_DEFAULT);
+ print_services(NULL, services, format);
goto exit;
/* NOTREACHED */
case 'u':
@@ -348,7 +348,7 @@ int main(int argc, char **argv)
break;
}
}
- print_services(NULL, services, FORMAT_DEFAULT);
+ print_services(NULL, services, format);
goto exit;
/* NOTREACHED */