summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2013-12-27 16:30:20 +0100
committerThierry Vignaud <thierry.vignaud@gmail.com>2013-12-27 16:30:20 +0100
commit43597ead30c23addf678befb21486a1ebecebe9b (patch)
tree98a01b248df9c4df1d68a1fb8c4faa413d63fa3a
parentb7a2d6b8e2179e89184532bdde07c500607119c9 (diff)
downloaddrakx-43597ead30c23addf678befb21486a1ebecebe9b.tar
drakx-43597ead30c23addf678befb21486a1ebecebe9b.tar.gz
drakx-43597ead30c23addf678befb21486a1ebecebe9b.tar.bz2
drakx-43597ead30c23addf678befb21486a1ebecebe9b.tar.xz
drakx-43597ead30c23addf678befb21486a1ebecebe9b.zip
do not fill logs with "Cannot open /dev/input/eventX" (mga#8232)
issue introduced in commit eea2f8ef9ddf7e461702d8fda0b8e98e623694c2 by Arnaud Patard on Mar 18 2011
-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;