diff options
Diffstat (limited to 'perl-install/detect_devices.pm')
-rw-r--r-- | perl-install/detect_devices.pm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index 46655599b..117f14ed8 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -1238,6 +1238,7 @@ sub matching_types() { mips_ict => is_mips_ict(), mips_st_ls2f => is_mips_st_ls2f(), cpufreq => hasCPUFreq(), + microcode => hasCPUMicrocode(), laptop => isLaptop(), 'numpad' => hasNumpad(), 'touchpad' => hasTouchpad(), @@ -1246,6 +1247,15 @@ sub matching_types() { }; } +sub hasCPUMicrocode() { + state $hasCPUMicrocode; + if (!defined $hasCPUMicrocode) { + eval { modules::load('microcode') }; + $hasCPUMicrocode = to_bool(find { 'microcode' } modules::loaded_modules()); + } + return $hasCPUMicrocode; +} + sub hasCPUFreq() { require cpufreq; cpufreq::get_modules() } sub hasWacom() { find { $_->{vendor} == 0x056a || $_->{driver} =~ /wacom/ } usb_probe() } sub hasTouchpad() { any { $_->{Synaptics} || $_->{ALPS} || $_->{Elantech} } getInputDevices() } |