X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=virt-what.in;h=96c18b498eef45f3c00dd23b61feab9974685996;hb=1fd1ba444af3d3618dabe6315ca2fa59820cf6ff;hp=313cd06e93b5814f7beddd32021d61b1ba8dfaa2;hpb=7ee7259d347089b50324d6b5e4e27d2ebee04a00;p=virt-what.git diff --git a/virt-what.in b/virt-what.in index 313cd06..96c18b4 100644 --- a/virt-what.in +++ b/virt-what.in @@ -1,6 +1,6 @@ #!/bin/bash - # @configure_input@ -# Copyright (C) 2008-2009 Red Hat Inc. +# Copyright (C) 2008-2010 Red Hat Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -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