summaryrefslogtreecommitdiffstats
path: root/perl-install/detect_devices.pm
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2013-12-27 16:26:07 +0100
committerThierry Vignaud <thierry.vignaud@gmail.com>2013-12-27 16:26:07 +0100
commitb7a2d6b8e2179e89184532bdde07c500607119c9 (patch)
treed5893856ec0f199b6df37f0e08457df5d4ba09c9 /perl-install/detect_devices.pm
parent7e9829688f6f4c94f5bea634c3f3e194a4c61ee1 (diff)
downloaddrakx-b7a2d6b8e2179e89184532bdde07c500607119c9.tar
drakx-b7a2d6b8e2179e89184532bdde07c500607119c9.tar.gz
drakx-b7a2d6b8e2179e89184532bdde07c500607119c9.tar.bz2
drakx-b7a2d6b8e2179e89184532bdde07c500607119c9.tar.xz
drakx-b7a2d6b8e2179e89184532bdde07c500607119c9.zip
do not crash if /dev/input/eventX doesn't exist (mga#10296)
do not attempt to create /dev/* if not root like previous commit, 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.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index 184a1db31..76e6e2a24 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -565,7 +565,7 @@ sub getInputDevices() {
#- KEY=30000 0 0 0 0 0 0 0 0 #=> BTN_LEFT BTN_RIGHT
#- KEY=70000 0 0 0 0 0 0 0 0 #=> BTN_LEFT BTN_RIGHT BTN_MIDDLE
#- KEY=1f0000 0 0 0 0 0 0 0 0 #=> BTN_LEFT BTN_RIGHT BTN_MIDDLE BTN_SIDE BTN_EXTRA
- if (! -f "/dev/input/$event") {
+ if (!$> && ! -f "/dev/input/$event") {
devices::make("/dev/input/$event");
}
my @KEYS = c::EVIocGBitKey("/dev/input/$event");