[Yaird-devel] Bug#443821: class/input/eventX links with kernel 2.6.23
Jan Echternach
jan at goneko.de
Tue Dec 11 14:56:18 UTC 2007
Package: yaird
Version: 0.0.12-24
yaird fails with the following message since I upgraded the kernel to 2.6.23:
yaird error: bad device link in /sys/class/input/event0/device (fatal)
> ls -l /sys/class/input/event0/device
lrwxrwxrwx 1 root root 0 Dec 11 14:01 /sys/class/input/event0/device -> ../../../../class/input/input0
I could get it to work again by adding an extra level of symlink resolution
to Input.pm. Not sure if that's the right thing to do, though, because the
eventX entries don't have direct device links by themselves but are always
subordinate to an inputX entry which may have the device link that Input.pm
is looking for. It might be better to look directly for input/inputX/device.
--- Input.pm.orig 2007-10-22 18:29:27.000000000 +0200
+++ Input.pm 2007-12-11 15:39:52.000000000 +0100
@@ -54,6 +54,11 @@
my $devLink = Conf::get('sysFs')
. "/class/input/$handler/device";
my $hw = readlink ($devLink);
+ if (defined ($hw) && $hw =~ s!^(\.\./)+(class/input/input\d+)$!$2!) {
+ # Linux 2.6.23 eventX -> inputX link
+ $devLink = Conf::get('sysFs') . '/' . $hw . '/device';
+ $hw = readlink ($devLink);
+ }
if (defined ($hw)) {
unless ($hw =~ s!^(\.\./)+devices/!!) {
# imagine localised linux (/sys/geraete ...)
--
Jan
More information about the Yaird-devel
mailing list