From 02f63a47ccadce7eb8ed75b1317164012def63c6 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 12 Nov 2007 15:51:15 +0000 Subject: - fix device /dev/input/by-id/usb-$ID_SERIAL-event-mouse for wacoms when the ID_SERIAL contains special chars --- lib/mouse.pm | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') 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; -- cgit v1.2.1