From 38db7c63850871d51a423c53d4ceb3a2f6ef0819 Mon Sep 17 00:00:00 2001 From: Daniel Hokka Zakrisson Date: Sat, 3 May 2008 16:53:45 +0000 Subject: [PATCH] Add pid space feature. git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2716 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- lib/issupported.c | 1 + lib/issupportedstring.c | 2 +- lib/vserver.h | 3 ++- scripts/vserver.functions | 5 +++-- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/issupported.c b/lib/issupported.c index 45b1c24..fb95fab 100644 --- a/lib/issupported.c +++ b/lib/issupported.c @@ -47,6 +47,7 @@ vc_isSupported(vcFeatureSet feature) case vcFEATURE_VNET : return ver >= 0x00020001; case vcFEATURE_VSTAT : return ver >= 0x00020103; case vcFEATURE_PPTAG : return conf & VC_VCI_PPTAG; + case vcFEATURE_PIDSPACE : return ver >= 0x00020303 || ver >= 0x00020201; default : assert(false); } diff --git a/lib/issupportedstring.c b/lib/issupportedstring.c index e9526f9..77402ae 100644 --- a/lib/issupportedstring.c +++ b/lib/issupportedstring.c @@ -34,7 +34,7 @@ static struct { DECL(VKILL), DECL(IATTR), DECL(RLIMIT), DECL(COMPAT), DECL(MIGRATE), DECL(NAMESPACE), DECL(SCHED), DECL(VINFO), DECL(VHI), DECL(VSHELPER0), DECL(VSHELPER), DECL(VWAIT), - DECL(VNET), DECL(VSTAT), DECL(PPTAG), + DECL(VNET), DECL(VSTAT), DECL(PPTAG), DECL(PIDSPACE), }; bool diff --git a/lib/vserver.h b/lib/vserver.h index 9df54d6..455e5b8 100644 --- a/lib/vserver.h +++ b/lib/vserver.h @@ -966,7 +966,8 @@ extern "C" { vcFEATURE_COMPAT, vcFEATURE_MIGRATE, vcFEATURE_NAMESPACE, vcFEATURE_SCHED, vcFEATURE_VINFO, vcFEATURE_VHI, vcFEATURE_VSHELPER0, vcFEATURE_VSHELPER, vcFEATURE_VWAIT, - vcFEATURE_VNET, vcFEATURE_VSTAT, vcFEATURE_PPTAG, } + vcFEATURE_VNET, vcFEATURE_VSTAT, vcFEATURE_PPTAG, + vcFEATURE_PIDSPACE, } vcFeatureSet; bool vc_isSupported(vcFeatureSet) VC_ATTR_CONST; diff --git a/scripts/vserver.functions b/scripts/vserver.functions index 26edb7b..a11cd90 100644 --- a/scripts/vserver.functions +++ b/scripts/vserver.functions @@ -757,8 +757,9 @@ function _generateSpaceOptions local vdir="$1" local d="$vdir"/spaces - test ! -e "$d"/pid || \ - OPTS_VSPACE=( "${OPTS_VSPACE[@]}" --pid ) + ( test ! -e "$d"/pid && + ! $_VSERVER_INFO PIDSPACE FEATURE ) || \ + OPTS_VSPACE=( "${OPTS_VSPACE[@]}" --pid ) test ! -e "$d"/net || { OPTS_VSPACE=( "${OPTS_VSPACE[@]}" --net ) -- 1.8.1.5