diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2013-12-27 16:30:20 +0100 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2013-12-27 16:30:20 +0100 |
commit | 43597ead30c23addf678befb21486a1ebecebe9b (patch) | |
tree | 98a01b248df9c4df1d68a1fb8c4faa413d63fa3a /perl-install/detect_devices.pm | |
parent | b7a2d6b8e2179e89184532bdde07c500607119c9 (diff) | |
download | drakx-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
Diffstat (limited to 'perl-install/detect_devices.pm')
-rw-r--r-- | perl-install/detect_devices.pm | 9 |
1 files changed, 7 insertions, 2 deletions
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; |