summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-11-12 15:51:15 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-11-12 15:51:15 +0000
commit02f63a47ccadce7eb8ed75b1317164012def63c6 (patch)
tree162f70c51d25905a4ab2a522a85e0ceec30f08e4
parent3260b03a884734319de1b4a2b9f845d23159b906 (diff)
downloaddrakx-kbd-mouse-x11-02f63a47ccadce7eb8ed75b1317164012def63c6.tar
drakx-kbd-mouse-x11-02f63a47ccadce7eb8ed75b1317164012def63c6.tar.gz
drakx-kbd-mouse-x11-02f63a47ccadce7eb8ed75b1317164012def63c6.tar.bz2
drakx-kbd-mouse-x11-02f63a47ccadce7eb8ed75b1317164012def63c6.tar.xz
drakx-kbd-mouse-x11-02f63a47ccadce7eb8ed75b1317164012def63c6.zip
- fix device /dev/input/by-id/usb-$ID_SERIAL-event-mouse for wacoms
when the ID_SERIAL contains special chars
-rw-r--r--NEWS3
-rw-r--r--lib/mouse.pm1
2 files changed, 4 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index e9851ef..3c49351 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+- fix device /dev/input/by-id/usb-$ID_SERIAL-event-mouse for wacoms
+ when the ID_SERIAL contains special chars
+
Version 0.38 - 1 November 2007, by Anssi Hannula
- display message "This setting will be activated after the installation."
diff --git a/lib/mouse.pm b/lib/mouse.pm
index 8440ddd..1c776ba 100644
--- a/lib/mouse.pm
+++ b/lib/mouse.pm
@@ -249,6 +249,7 @@ sub probe_usb_wacom_devices() {
map {
my $ID_SERIAL = chomp_(run_program::get_stdout('/lib/udev/usb_id', $_->{sysfs_path}));
+ $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
my $sysfs_device = "input/by-id/usb-$ID_SERIAL-event-mouse"; #- from /etc/udev/rules.d/60-persistent-input.rules
if ($::isInstall || -e "/dev/$sysfs_device") {
$sysfs_device;