summaryrefslogtreecommitdiffstats
path: root/virt-what.in
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2010-10-18 20:02:21 +0100
committerRichard W.M. Jones <rjones@redhat.com>2010-10-18 20:02:21 +0100
commitaa734a5bff82b36d0b085d3fa87ba0a04a0b73b0 (patch)
tree61b56eb1800689d1d2e11750b2919100fd6baa32 /virt-what.in
parent7ee7259d347089b50324d6b5e4e27d2ebee04a00 (diff)
downloadvirt-what-aa734a5bff82b36d0b085d3fa87ba0a04a0b73b0.tar.gz
virt-what-aa734a5bff82b36d0b085d3fa87ba0a04a0b73b0.tar.xz
virt-what-aa734a5bff82b36d0b085d3fa87ba0a04a0b73b0.zip
xen: More reliable differentiation of dom0 and domU.
Diffstat (limited to 'virt-what.in')
-rw-r--r--virt-what.in10
1 files changed, 6 insertions, 4 deletions
diff --git a/virt-what.in b/virt-what.in
index 313cd06..375822e 100644
--- a/virt-what.in
+++ b/virt-what.in
@@ -121,11 +121,13 @@ fi
if [ "$cpuid" = "XenVMMXenVMM" ]; then
echo xen; echo xen-hvm
is_xen=1
-elif [ -f /proc/xen/privcmd ]; then
- echo xen; echo xen-dom0
- is_xen=1
elif [ -f /proc/xen/capabilities ]; then
- echo xen; echo xen-domU
+ echo xen
+ if grep -q "control_d" /proc/xen/capabilities; then
+ echo xen-dom0
+ else
+ echo xen-domU
+ fi
is_xen=1
elif [ -d /proc/xen ]; then
# This directory can be present when Xen paravirt drivers are