1 |
commit: f5cf1136e70502ee530f20f0434f312611b12b51 |
2 |
Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com> |
3 |
AuthorDate: Wed Dec 2 21:44:35 2015 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Dec 2 21:44:35 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=f5cf1136 |
7 |
|
8 |
Use systype variable for rc_sys call |
9 |
|
10 |
src/rc/rc.c | 7 ++++--- |
11 |
1 file changed, 4 insertions(+), 3 deletions(-) |
12 |
|
13 |
diff --git a/src/rc/rc.c b/src/rc/rc.c |
14 |
index d96aa45..8f69333 100644 |
15 |
--- a/src/rc/rc.c |
16 |
+++ b/src/rc/rc.c |
17 |
@@ -752,6 +752,7 @@ main(int argc, char **argv) |
18 |
{ |
19 |
const char *bootlevel = NULL; |
20 |
char *newlevel = NULL; |
21 |
+ const char *systype = NULL; |
22 |
static RC_STRINGLIST *hotplugged_services; |
23 |
static RC_STRINGLIST *stop_services; |
24 |
static RC_STRINGLIST *start_services; |
25 |
@@ -845,9 +846,9 @@ main(int argc, char **argv) |
26 |
eerrorx("%s: %s", applet, strerror(errno)); |
27 |
/* NOTREACHED */ |
28 |
case 'S': |
29 |
- bootlevel = rc_sys(); |
30 |
- if (bootlevel) |
31 |
- printf("%s\n", bootlevel); |
32 |
+ systype = rc_sys(); |
33 |
+ if (systype) |
34 |
+ printf("%s\n", systype); |
35 |
exit(EXIT_SUCCESS); |
36 |
/* NOTREACHED */ |
37 |
case_RC_COMMON_GETOPT |