summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2011-12-19 09:55:21 +0000
committerThierry Vignaud <tv@mageia.org>2011-12-19 09:55:21 +0000
commit5e8b0144e8105bab4da933d05ad53543943c97a1 (patch)
treec5e69f366531a25fcb1feea6faff7f0a712533aa
parentcc0d41101680bfca80dee7e83ccc82793a7f789e (diff)
downloaddrakx-kbd-mouse-x11-5e8b0144e8105bab4da933d05ad53543943c97a1.tar
drakx-kbd-mouse-x11-5e8b0144e8105bab4da933d05ad53543943c97a1.tar.gz
drakx-kbd-mouse-x11-5e8b0144e8105bab4da933d05ad53543943c97a1.tar.bz2
drakx-kbd-mouse-x11-5e8b0144e8105bab4da933d05ad53543943c97a1.tar.xz
drakx-kbd-mouse-x11-5e8b0144e8105bab4da933d05ad53543943c97a1.zip
cleanups
-rw-r--r--lib/mouse.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/mouse.pm b/lib/mouse.pm
index 0409327..0ae34a0 100644
--- a/lib/mouse.pm
+++ b/lib/mouse.pm
@@ -197,11 +197,11 @@ sub _input_entry_to_device_by_id {
my ($input) = @_;
my $ID_SERIAL = "";
- for (split /^/, run_program::get_stdout('udevadm', 'info', '--query', 'env', '--path', $input->{sysfs_path})) {
+ foreach (split /^/, run_program::get_stdout('udevadm', 'info', '--query', 'env', '--path', $input->{sysfs_path})) {
if (/^ID_SERIAL=(.*)/) {
$ID_SERIAL = $1;
$ID_SERIAL =~ s/[^\w#+\-.:=@_]/_/g; #- udev do a further cleanup, eg: "Wacom_Co.,Ltd._MTE-450" => "Wacom_Co._Ltd._MTE-450". cf ALLOWED_CHARS udev.h
- break;
+ last;
}
}
my $sysfs_device = "input/by-id/usb-$ID_SERIAL-event-mouse"; #- from /etc/udev/rules.d/60-persistent-input.rules