From: Enrico Scholz Date: Thu, 20 Nov 2003 18:06:22 +0000 (+0000) Subject: vc_getVserverByCtx(), vc_getVserverCtx(): added X-Git-Tag: VERSION_0_10~1060 X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6c7dec67273e41c6e94c906c7864e451e4956e4a;p=util-vserver.git vc_getVserverByCtx(), vc_getVserverCtx(): added git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@428 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- diff --git a/util-vserver/lib/vserver.h b/util-vserver/lib/vserver.h index 4a3ba90..5a120ee 100644 --- a/util-vserver/lib/vserver.h +++ b/util-vserver/lib/vserver.h @@ -169,6 +169,17 @@ extern "C" { char * vc_getVserverName(char const *id, vcCfgStyle style); char * vc_getVserverVdir(char const *id, vcCfgStyle style); + + /** Returns the ctx of the given vserver, or VC_NOCTX if vserver is not + * running */ + ctx_t vc_getVserverCtx(char const *id, vcCfgStyle style); + + /** Resolves the cfg-path of the vserver owning the given ctx. 'revdir' will + be used as the directory holding the mapping-links; when NULL, the + default value will be assumed. The result will be allocated and must be + freed by the caller. */ + char * vc_getVserverByCtx(ctx_t ctx, /*@null@*/vcCfgStyle *style, + /*@null@*/char const *revdir); #ifdef __cplusplus }