ready for tagging
[util-vserver.git] / lib / issupported.c
index 544403f..7314af6 100644 (file)
@@ -1,4 +1,4 @@
-// $Id: issupported.c,v 1.4 2005/05/19 18:05:18 ensc Exp $    --*- c -*--
+// $Id: issupported.c 2589 2007-08-16 03:06:50Z dhozac $    --*- c -*--
 
 // Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 //  
 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;
@@ -42,6 +44,9 @@ vc_isSupported(vcFeatureSet feature)
     case vcFEATURE_NAMESPACE   :  return ver >= 0x00010012;
     case vcFEATURE_VWAIT       :  return ver >= 0x00010025;
     case vcFEATURE_SCHED       :  return ver >= 0x00020000;  // todo
+    case vcFEATURE_VNET                :  return ver >= 0x00020001;
+    case vcFEATURE_VSTAT       :  return ver >= 0x00020103;
+    case vcFEATURE_PPTAG       :  return conf & VC_VCI_PPTAG;
     default                    :  assert(false); 
   }