Package: joystick Version: 1:1.4.3-1 Severity: important Tags: patch Dear Maintainer,
I cannot use fftest and ffmvforce with my Xbox controller. That controller has the following filename: /dev/input/by-id/usb-©Microsoft_Corporation_Controller_04ABDCE-joystick which does not work with the mentioned tools, as they chop off the filename after 64 characters. The attached patch increases this limit to 256 characters. Kind regards, Ralf -- Package-specific info: Udevadm info starts with the device specified by the devpath and then walks up the chain of parent devices. It prints for every device found, all possible attributes in the udev rules key format. A rule to match, can be composed by the attributes of the device and the attributes from one single parent device. looking at device '/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.1/4-1.1:1.0/input/input25/js0': KERNEL=="js0" SUBSYSTEM=="input" DRIVER=="" looking at parent device '/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.1/4-1.1:1.0/input/input25': KERNELS=="input25" SUBSYSTEMS=="input" DRIVERS=="" ATTRS{name}=="Microsoft X-Box 360 pad" ATTRS{phys}=="usb-0000:00:1d.0-1.1/input0" ATTRS{uniq}=="" ATTRS{properties}=="0" looking at parent device '/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.1/4-1.1:1.0': KERNELS=="4-1.1:1.0" SUBSYSTEMS=="usb" DRIVERS=="xpad" ATTRS{bInterfaceClass}=="ff" ATTRS{bInterfaceSubClass}=="5d" ATTRS{bInterfaceProtocol}=="01" ATTRS{bNumEndpoints}=="02" ATTRS{supports_autosuspend}=="0" ATTRS{bAlternateSetting}==" 0" ATTRS{bInterfaceNumber}=="00" looking at parent device '/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.1': KERNELS=="4-1.1" SUBSYSTEMS=="usb" DRIVERS=="usb" ATTRS{bDeviceSubClass}=="ff" ATTRS{bDeviceProtocol}=="ff" ATTRS{devpath}=="1.1" ATTRS{idVendor}=="045e" ATTRS{speed}=="12" ATTRS{bNumInterfaces}==" 4" ATTRS{bConfigurationValue}=="1" ATTRS{bMaxPacketSize0}=="8" ATTRS{busnum}=="4" ATTRS{devnum}=="16" ATTRS{configuration}=="" ATTRS{bMaxPower}=="500mA" ATTRS{authorized}=="1" ATTRS{bmAttributes}=="a0" ATTRS{bNumConfigurations}=="1" ATTRS{maxchild}=="0" ATTRS{bcdDevice}=="0114" ATTRS{avoid_reset_quirk}=="0" ATTRS{quirks}=="0x0" ATTRS{serial}=="04ABDCE" ATTRS{version}==" 2.00" ATTRS{urbnum}=="894" ATTRS{ltm_capable}=="no" ATTRS{removable}=="removable" ATTRS{idProduct}=="028e" ATTRS{bDeviceClass}=="ff" ATTRS{product}=="Controller" looking at parent device '/devices/pci0000:00/0000:00:1d.0/usb4/4-1': KERNELS=="4-1" SUBSYSTEMS=="usb" DRIVERS=="usb" ATTRS{bDeviceSubClass}=="00" ATTRS{bDeviceProtocol}=="01" ATTRS{devpath}=="1" ATTRS{idVendor}=="8087" ATTRS{speed}=="480" ATTRS{bNumInterfaces}==" 1" ATTRS{bConfigurationValue}=="1" ATTRS{bMaxPacketSize0}=="64" ATTRS{busnum}=="4" ATTRS{devnum}=="2" ATTRS{configuration}=="" ATTRS{bMaxPower}==" 0mA" ATTRS{authorized}=="1" ATTRS{bmAttributes}=="e0" ATTRS{bNumConfigurations}=="1" ATTRS{maxchild}=="6" ATTRS{bcdDevice}=="0000" ATTRS{avoid_reset_quirk}=="0" ATTRS{quirks}=="0x0" ATTRS{version}==" 2.00" ATTRS{urbnum}=="4026" ATTRS{ltm_capable}=="no" ATTRS{removable}=="unknown" ATTRS{idProduct}=="0024" ATTRS{bDeviceClass}=="09" looking at parent device '/devices/pci0000:00/0000:00:1d.0/usb4': KERNELS=="usb4" SUBSYSTEMS=="usb" DRIVERS=="usb" ATTRS{bDeviceSubClass}=="00" ATTRS{bDeviceProtocol}=="00" ATTRS{devpath}=="0" ATTRS{idVendor}=="1d6b" ATTRS{speed}=="480" ATTRS{bNumInterfaces}==" 1" ATTRS{bConfigurationValue}=="1" ATTRS{bMaxPacketSize0}=="64" ATTRS{authorized_default}=="1" ATTRS{busnum}=="4" ATTRS{devnum}=="1" ATTRS{configuration}=="" ATTRS{bMaxPower}==" 0mA" ATTRS{authorized}=="1" ATTRS{bmAttributes}=="e0" ATTRS{bNumConfigurations}=="1" ATTRS{maxchild}=="2" ATTRS{bcdDevice}=="0308" ATTRS{avoid_reset_quirk}=="0" ATTRS{quirks}=="0x0" ATTRS{serial}=="0000:00:1d.0" ATTRS{version}==" 2.00" ATTRS{urbnum}=="3349" ATTRS{ltm_capable}=="no" ATTRS{manufacturer}=="Linux 3.8.11 ehci_hcd" ATTRS{removable}=="unknown" ATTRS{idProduct}=="0002" ATTRS{bDeviceClass}=="09" ATTRS{product}=="EHCI Host Controller" looking at parent device '/devices/pci0000:00/0000:00:1d.0': KERNELS=="0000:00:1d.0" SUBSYSTEMS=="pci" DRIVERS=="ehci-pci" ATTRS{irq}=="23" ATTRS{subsystem_vendor}=="0x1043" ATTRS{broken_parity_status}=="0" ATTRS{class}=="0x0c0320" ATTRS{companion}=="" ATTRS{consistent_dma_mask_bits}=="32" ATTRS{dma_mask_bits}=="32" ATTRS{local_cpus}=="00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,0000000f" ATTRS{device}=="0x1c26" ATTRS{uframe_periodic_max}=="100" ATTRS{msi_bus}=="" ATTRS{local_cpulist}=="0-3" ATTRS{vendor}=="0x8086" ATTRS{subsystem_device}=="0x1277" ATTRS{numa_node}=="-1" ATTRS{d3cold_allowed}=="1" looking at parent device '/devices/pci0000:00': KERNELS=="pci0000:00" SUBSYSTEMS=="" DRIVERS=="" -- System Information: Debian Release: 7.0 APT prefers testing APT policy: (990, 'testing'), (100, 'unstable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.8.11 (SMP w/4 CPU cores) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages joystick depends on: ii libc6 2.13-38 ii libsdl1.2debian 1.2.15-5 Versions of packages joystick recommends: ii evtest 1:1.30-1 ii inputattach 1:1.4.3-1 joystick suggests no packages. -- no debconf information
Increase max. length of filenames for fftest and ffmvforce --- a/utils/fftest.c +++ b/utils/fftest.c @@ -57,7 +57,7 @@ struct ff_effect effects[N_EFFECTS]; struct input_event play, stop; int fd; - char device_file_name[64]; + char device_file_name[256]; unsigned long features[4]; int n_effects; /* Number of effects the device can play at the same time */ int i; @@ -65,16 +65,16 @@ printf("Force feedback test program.\n"); printf("HOLD FIRMLY YOUR WHEEL OR JOYSTICK TO PREVENT DAMAGES\n\n"); - strncpy(device_file_name, "/dev/input/event0", 64); + strncpy(device_file_name, "/dev/input/event0", 256); for (i=1; i<argc; ++i) { - if (strncmp(argv[i], "--help", 64) == 0) { + if (strncmp(argv[i], "--help", 256) == 0) { printf("Usage: %s /dev/input/eventXX\n", argv[0]); printf("Tests the force feedback driver\n"); exit(1); } else { - strncpy(device_file_name, argv[i], 64); + strncpy(device_file_name, argv[i], 256); } } --- a/utils/ffmvforce.c +++ b/utils/ffmvforce.c @@ -38,7 +38,7 @@ #include <SDL.h> #define BIT(x) (1<<(x)) -#define STR_LEN 64 +#define STR_LEN 256 #define WIN_W 400 #define WIN_H 400 #define max(a,b) ((a)>(b)?(a):(b))