xen: Don't emit warning message if /proc/xen/capabilities file does not exist.
[virt-what.git] / virt-what.in
index 422f6d0..4b6d3b8 100644 (file)
@@ -197,9 +197,9 @@ fi
 if [ "$cpuid" = "XenVMMXenVMM" ]; then
     echo xen; echo xen-hvm
     skip_qemu_kvm=true
-elif [ -f "${root}/proc/xen/capabilities" ]; then
+elif [ -d "${root}/proc/xen" ]; then
     echo xen
-    if grep -q "control_d" "${root}/proc/xen/capabilities"; then
+    if grep -q "control_d" "${root}/proc/xen/capabilities" 2>/dev/null; then
         echo xen-dom0
     else
         echo xen-domU