Missing have_cpuinfo check.
authorJasper Lievisse Adriaanse <bug@jasper.la>
Thu, 10 Aug 2017 07:44:01 +0000 (08:44 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Thu, 10 Aug 2017 07:44:01 +0000 (08:44 +0100)
virt-what.in

index 8c27b11..9050035 100644 (file)
@@ -308,7 +308,7 @@ if ! "$skip_qemu_kvm"; then
         # option, since /proc/cpuinfo will not contain the QEMU
         # string. QEMU 2.10 added a new CPUID leaf, so this
         # problem only triggered for older QEMU
-        if grep -q 'QEMU' "${root}/proc/cpuinfo"; then
+        if have_cpuinfo && grep -q 'QEMU' "${root}/proc/cpuinfo"; then
             echo qemu
         fi
     fi