aboutsummaryrefslogtreecommitdiff
path: root/src/rc-status
diff options
context:
space:
mode:
Diffstat (limited to 'src/rc-status')
-rw-r--r--src/rc-status/meson.build2
-rw-r--r--src/rc-status/rc-status.c13
2 files changed, 14 insertions, 1 deletions
diff --git a/src/rc-status/meson.build b/src/rc-status/meson.build
index 7377d837..ee3f3782 100644
--- a/src/rc-status/meson.build
+++ b/src/rc-status/meson.build
@@ -1,6 +1,6 @@
executable('rc-status',
['rc-status.c', misc_c, usage_c, version_h],
- c_args : cc_branding_flags,
+ c_args : [cc_branding_flags, cc_user_services_flags],
link_with: [libeinfo, librc],
dependencies: [util_dep],
include_directories: [incdir, einfo_incdir, rc_incdir],
diff --git a/src/rc-status/rc-status.c b/src/rc-status/rc-status.c
index 78d5a6af..d56fe830 100644
--- a/src/rc-status/rc-status.c
+++ b/src/rc-status/rc-status.c
@@ -39,7 +39,11 @@ enum format_t {
const char *applet = NULL;
const char *extraopts = NULL;
+#ifdef RC_USER_SERVICES
+const char getoptstring[] = "acf:lmrsSu" getoptstring_COMMON getoptstring_USER_SERVICES;
+#else
const char getoptstring[] = "acf:lmrsSu" getoptstring_COMMON;
+#endif
const struct option longopts[] = {
{"all", 0, NULL, 'a'},
{"crashed", 0, NULL, 'c'},
@@ -50,6 +54,9 @@ const struct option longopts[] = {
{"servicelist", 0, NULL, 's'},
{"supervised", 0, NULL, 'S'},
{"unused", 0, NULL, 'u'},
+#ifdef RC_USER_SERVICES
+ longopts_USER_SERVICES
+#endif
longopts_COMMON
};
const char * const longopts_help[] = {
@@ -62,6 +69,9 @@ const char * const longopts_help[] = {
"Show service list",
"show supervised services",
"Show services not assigned to any runlevel",
+#ifdef RC_USER_SERVICES
+ longopts_help_USER_SERVICES
+#endif
longopts_help_COMMON
};
const char *usagestring = "" \
@@ -354,6 +364,9 @@ int main(int argc, char **argv)
goto exit;
/* NOTREACHED */
+#ifdef RC_USER_SERVICES
+ case_RC_USER_SERVICES
+#endif
case_RC_COMMON_GETOPT
}