summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/NEWS1
-rw-r--r--perl-install/detect_devices.pm9
2 files changed, 8 insertions, 2 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index 61efd0828..a65d4164f 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,6 +1,7 @@
- detecting input devices:
o display the real accessed /dev/input/eventX file (mga#8232)
o do not crash if /dev/input/eventX doesn't exist (mga#10296)
+ o do not fill logs with "Cannot open /dev/input/eventX" (mga#8232)
- draksec:
o use expanders for clarity
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index 76e6e2a24..83011ddc6 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -568,8 +568,13 @@ sub getInputDevices() {
if (!$> && ! -f "/dev/input/$event") {
devices::make("/dev/input/$event");
}
- my @KEYS = c::EVIocGBitKey("/dev/input/$event");
- $device->{SIDE} = 1 if $KEYS[0] & (1 << 0x13);
+ if (-r "/dev/input/$event") {
+ my @KEYS = c::EVIocGBitKey("/dev/input/$event");
+ $device->{SIDE} = 1 if $KEYS[0] & (1 << 0x13);
+ } else {
+ my $KEY = hex($1);
+ $device->{SIDE} = 1 if $KEY & (1 << 0x13);
+ }
} elsif (/^\s*$/) {
push @devices, $device if $device;