Add hidden attribute to be used for versioned symbols.
[util-vserver.git] / lib / issupported.c
index 30b6fb3..7169db8 100644 (file)
 bool
 vc_isSupported(vcFeatureSet feature)
 {
-  int  ver = vc_get_version();
+  int          ver = vc_get_version();
+  vc_vci_t     conf = vc_get_vci();
   if (ver==-1) return false;
+  if (conf==(vc_vci_t)-1) conf = 0;
 
   switch (feature) {
     case vcFEATURE_COMPAT      :  return true;
@@ -43,6 +45,11 @@ vc_isSupported(vcFeatureSet feature)
     case vcFEATURE_VWAIT       :  return ver >= 0x00010025;
     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_PPTAG       :  return conf & VC_VCI_PPTAG;
+    case vcFEATURE_SPACES      :  return conf & VC_VCI_SPACES;
+    case vcFEATURE_PIDSPACE    :  return ver >= 0x00020304 || ver >= 0x00020201;
     default                    :  assert(false); 
   }