diff options
author | William Hubbs <w.d.hubbs@gmail.com> | 2012-07-02 22:04:22 -0500 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2012-07-26 10:54:48 -0500 |
commit | e641b4384977011b93c3c2a90222d459bc4c5ca6 (patch) | |
tree | 7846b824c0e040f096c6526d731aa8051c59452b /src/librc | |
parent | a6db2374fe69704ec55de86d815b127432328f24 (diff) |
Bring Back prefix support
We now have a team member who is interested in OpenRC on prefix, so I am
bringing it back to the main tree.
Diffstat (limited to 'src/librc')
-rw-r--r-- | src/librc/librc.c | 6 | ||||
-rw-r--r-- | src/librc/rc.h.in | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/librc/librc.c b/src/librc/librc.c index ed601964..d82880fb 100644 --- a/src/librc/librc.c +++ b/src/librc/librc.c @@ -216,6 +216,7 @@ rc_sys_v2(void) } /* Now do detection */ __STRING_SWITCH(systype) + __STRING_CASE(RC_SYS_PREFIX) { return RC_SYS_PREFIX; } #ifdef __FreeBSD__ __STRING_CASE(RC_SYS_JAIL) { return RC_SYS_JAIL; } #endif /* __FreeBSD__ */ @@ -245,6 +246,10 @@ librc_hidden_def(rc_sys_v2) const char * rc_sys_v1(void) { +#ifdef PREFIX + return RC_SYS_PREFIX; +#else + #ifdef __FreeBSD__ int jailed = 0; size_t len = sizeof(jailed); @@ -281,6 +286,7 @@ rc_sys_v1(void) #endif return NULL; +#endif /* PREFIX */ } librc_hidden_def(rc_sys_v1) diff --git a/src/librc/rc.h.in b/src/librc/rc.h.in index 96926a5a..e4cb60dd 100644 --- a/src/librc/rc.h.in +++ b/src/librc/rc.h.in @@ -280,6 +280,7 @@ bool rc_service_daemons_crashed(const char *); #define RC_SYS_JAIL "JAIL" #define RC_SYS_OPENVZ "OPENVZ" #define RC_SYS_LXC "LXC" +#define RC_SYS_PREFIX "PREFIX" #define RC_SYS_UML "UML" #define RC_SYS_VSERVER "VSERVER" #define RC_SYS_XEN0 "XEN0" |