summaryrefslogtreecommitdiff
path: root/src/rc/rc.c
diff options
context:
space:
mode:
authorWilliam Hubbs <williamh@gentoo.org>2011-02-12 19:15:29 -0600
committerWilliam Hubbs <w.d.hubbs@gmail.com>2011-02-14 18:40:05 -0600
commit73d1a8698e101b1dcf589b27b35ac9b09ea6d02c (patch)
treec1ab7cbb6370d43c20f87ca0480f18731ecc0ed1 /src/rc/rc.c
parentbae0a693a9271b3ed0f723fdafc22efe5f07b70e (diff)
downloadopenrc-73d1a8698e101b1dcf589b27b35ac9b09ea6d02c.tar.gz
openrc-73d1a8698e101b1dcf589b27b35ac9b09ea6d02c.tar.bz2
openrc-73d1a8698e101b1dcf589b27b35ac9b09ea6d02c.tar.xz
make version option common
This reworks the code for the version option so that it is part of the parser loop and is a common option to all applets.
Diffstat (limited to 'src/rc/rc.c')
-rw-r--r--src/rc/rc.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/rc/rc.c b/src/rc/rc.c
index bdda2ef..525ccdc 100644
--- a/src/rc/rc.c
+++ b/src/rc/rc.c
@@ -837,18 +837,6 @@ main(int argc, char **argv)
if (!applet)
eerrorx("arguments required");
- if (argc > 1 && (strcmp(argv[1], "--version") == 0)) {
- printf("%s (OpenRC", applet);
- if ((bootlevel = rc_sys()))
- printf(" [%s]", bootlevel);
- printf(") " VERSION
-#ifdef BRANDING
- " (" BRANDING ")"
-#endif
- "\n");
- exit(EXIT_SUCCESS);
- }
-
/* Run our built in applets. If we ran one, we don't return. */
run_applets(argc, argv);
@@ -905,8 +893,8 @@ main(int argc, char **argv)
}
exit(EXIT_SUCCESS);
/* NOTREACHED */
- case_RC_COMMON_GETOPT
- }
+ case_RC_COMMON_GETOPT
+ }
}
newlevel = argv[optind++];