From 4e63a3343f7f5a4ac9f6d18bac1ad51b5cfd042d Mon Sep 17 00:00:00 2001 From: Daniel Hokka Zakrisson Date: Thu, 28 Oct 2010 13:52:13 +0000 Subject: [PATCH] Enumerate processes for kernels without memory cgroups and the stat API. git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2917 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- lib/issupported.c | 2 +- src/vserver-stat.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/issupported.c b/lib/issupported.c index cb7bcba..e1176de 100644 --- a/lib/issupported.c +++ b/lib/issupported.c @@ -46,7 +46,7 @@ vc_isSupported(vcFeatureSet feature) case vcFEATURE_SCHED : return ver >= 0x00020000; // todo case vcFEATURE_VNET : return ver >= 0x00020001; case vcFEATURE_PERSISTENT : return ver >= 0x00020002; - case vcFEATURE_VSTAT : return ver >= 0x00020103; + case vcFEATURE_VSTAT : return ver >= 0x00020103 && ver < 0x00020306; case vcFEATURE_PPTAG : return conf & VC_VCI_PPTAG; case vcFEATURE_SPACES : return conf & VC_VCI_SPACES; case vcFEATURE_PIVOT_ROOT : return ver >= 0x00020304; diff --git a/src/vserver-stat.c b/src/vserver-stat.c index 4b298f1..dee9d77 100644 --- a/src/vserver-stat.c +++ b/src/vserver-stat.c @@ -762,7 +762,7 @@ int main(int argc, char **argv) Vector_init(&xid_data, sizeof(struct XidData)); - if (vc_isSupported(vcFEATURE_VSTAT) && !vc_isSupported(vcFEATURE_MEMCG)) { + if (vc_isSupported(vcFEATURE_VSTAT)) { unsigned long xid; Echdir(PROC_VIRT_DIR_NAME); proc_dir = Eopendir("."); -- 1.8.1.5