Martin Pitt wrote: > Michael Tokarev [2009-12-25 1:51 +0300]: >>> Not really :( We print in groups of longs so it is either 32 or 64 bits >>> worth of data per number. >> Ok, I stand corrected. I verified the issue with 32bit kernel, and >> there, hald works as expected, listing `synaptics' as x11_driver >> and correct input.touchpad capability. > > Just to have all the data, could you please find the input device > number (from lshal, as you did before), and send the output of > > cat /sys/class/input/inputX/capabilities/key > > (replace X with the particular input device number) under a 32 and 64 > bit system?
It's shown in /proc/bus/input/devices too. Sure I can, here we go: 32bit: 6420 0 7000f 0 0 0 0 0 0 0 0 64bit: 6420 7000f 0 0 0 0 > Also, do you get correct or wrong ID_INPUT_* flags for the synaptics > device in "udevadm info --export-db|less"? I expect it to be wrong as > well, since it's pretty much the same code. in both cases userspace is 32bit, but kernel bitness is different: 32bit: P: /devices/platform/i8042/serio4/input/input9 E: UDEV_LOG=3 E: DEVPATH=/devices/platform/i8042/serio4/input/input9 E: PRODUCT=11/2/7/12b1 E: NAME="SynPS/2 Synaptics TouchPad" E: PHYS="isa0060/serio4/input0" E: EV==b E: KEY==6420 0 7000f 0 0 0 0 0 0 0 0 E: ABS==11000003 E: MODALIAS=input:b0011v0002p0007e12B1-e0,1,3,k100,101,102,103,110,111,112,145,14A,14D,14E,ra0,1,18,1C,mlsfw E: SUBSYSTEM=input 64bit: P: /devices/platform/i8042/serio4/input/input9 E: UDEV_LOG=3 E: DEVPATH=/devices/platform/i8042/serio4/input/input9 E: PRODUCT=11/2/7/12b1 E: NAME="SynPS/2 Synaptics TouchPad" E: PHYS="isa0060/serio4/input0" E: EV==b E: KEY==6420 7000f 0 0 0 0 E: ABS==11000003 E: MODALIAS=input:b0011v0002p0007e12B1-e0,1,3,k100,101,102,103,110,111,112,145,14A,14D,14E,ra0,1,18,1C,mlsfw E: SUBSYSTEM=input Udev merely collects text attributes from sysfs, so it's expected that all the attributes are the same as kernel says they are. > udev/hal already use sizeof(long) to determine the length of a long > word length, and it doesn't seem to happen everywhere. (I am running a > 64 bit kernel/userspace and get correct results). It works correctly with 32bit userspace and 32bit kernel too. > I might have misunderstood you, but did you actually try to run a 64 > bit kernel under 32 bit userspace? That would explain the bug, since > hal/udev were compiled with the assumption that sizeof(long) == 4, > while the kernel prints those in groups of 8 bytes. This is exactly what happens, to me and to the original bug reporter -- we both are running 32bit userspace and 64bit kernel. Note that the difference between ioctl and sysfs is exactly in this kind of issues: to be independent of word size... ;) > So if we want to support mixed kernel/userspace word lenghts, we need > to change the logic to do a dynamic word size detection based on > uname(). Not uname please. There should be a better way :) For example, see the number of words shown in "key" attribute: for 32bits it's two times of 64bits... /mjt -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org