Package: udev
Version: 0.141-1
Severity: normal

Hi,
According to the USB speck bInterfaceProtocol == 0 for the
bInterfaceClass == 3 (hid) means "none". Without this device names end
up like:

/dev/input/by-path/pci-0001\:10\:17.0-event-

where they should end up as:

/dev/input/by-path/pci-0001\:10\:17.0-event-none

for better readability and consistency with kbd and mouse. Possible
patch attached.
Cheers,
 -- Guido
>From 220b96fcd6a21c37bdbca13de0e30f5a8bac02af Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Guido=20G=C3=BCnther?= <a...@sigxcpu.org>
Date: Tue, 21 Apr 2009 19:45:08 +0200
Subject: [PATCH] =?utf-8?q?set=20ID=5FCLASS=20to=20none=20for=20bInterfaceProtocol=C2=A0=3D=3D=200?=
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

According to the USB speck bInterfaceProtocol == 0 for the
bInterfaceClass == 3 (hid) means "none". Without this device names end
up like:

/dev/input/by-path/pci-0001\:10\:17.0-event-

where they should end up as:

/dev/input/by-path/pci-0001\:10\:17.0-event-none

for better readability and consistency with kbd and mouse.
---
 rules/debian/60-persistent-input.rules  |    3 +++
 rules/rules.d/60-persistent-input.rules |    1 +
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/rules/debian/60-persistent-input.rules b/rules/debian/60-persistent-input.rules
index 38e54ce..2d80e77 100644
--- a/rules/debian/60-persistent-input.rules
+++ b/rules/debian/60-persistent-input.rules
@@ -6,6 +6,9 @@ KERNEL=="input[0-9]*",			GOTO="persistent_input_end"
 # usb devices
 SUBSYSTEMS=="usb",			IMPORT{program}="usb_id --export $devpath"
 SUBSYSTEMS=="usb", \
+	ATTRS{bInterfaceClass}=="03", ATTRS{bInterfaceProtocol}=="00", \
+					ENV{ID_CLASS}="none"
+SUBSYSTEMS=="usb", \
 	ATTRS{bInterfaceClass}=="03", ATTRS{bInterfaceProtocol}=="01", \
 					ENV{ID_CLASS}="kbd"
 SUBSYSTEMS=="usb", \
diff --git a/rules/rules.d/60-persistent-input.rules b/rules/rules.d/60-persistent-input.rules
index fff766f..73aa3db 100644
--- a/rules/rules.d/60-persistent-input.rules
+++ b/rules/rules.d/60-persistent-input.rules
@@ -6,6 +6,7 @@ KERNEL=="input[0-9]*", GOTO="persistent_input_end"
 
 # usb devices
 SUBSYSTEMS=="usb", IMPORT{program}="usb_id --export %p"
+SUBSYSTEMS=="usb", ATTRS{bInterfaceClass}=="03", ATTRS{bInterfaceProtocol}=="00", ENV{ID_CLASS}="none"
 SUBSYSTEMS=="usb", ATTRS{bInterfaceClass}=="03", ATTRS{bInterfaceProtocol}=="01", ENV{ID_CLASS}="kbd"
 SUBSYSTEMS=="usb", ATTRS{bInterfaceClass}=="03", ATTRS{bInterfaceProtocol}=="02", ENV{ID_CLASS}="mouse"
 
-- 
1.6.2.1

Reply via email to