From 6ca54770c96bd744892891e7476ea01b64f61796 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 23 Mar 2016 17:53:00 +0100 Subject: simplify: use virt_technology() --- perl-install/detect_devices.pm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'perl-install/detect_devices.pm') diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index 48eb3e68f..d93333016 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -1478,8 +1478,7 @@ Are we running under Hyper-V hypervisor? =cut sub isHyperv() { - dmidecode_category('System')->{Manufacturer} =~ /Microsoft Corporation/i - && dmidecode_category('System')->{'Product Name'} =~ /Virtual Machine/i; + virt_technology() eq 'microsoft'; } =item is_virtualbox() @@ -1489,7 +1488,7 @@ Are we running under VirtualBox hypervisor? =cut sub is_virtualbox() { - any { $_->{driver} eq 'vboxadd' } detect_devices::pci_probe(); + virt_technology() eq 'oracle'; } =item is_vmware() @@ -1499,7 +1498,7 @@ Are we running under VMware hypervisor? =cut sub is_vmware() { - any { $_->{driver} =~ /Card:VMware/ } detect_devices::pci_probe(); + virt_technology() eq 'vmware'; } =item is_netbook_nettop() -- cgit v1.2.1