Kernel ABI problem after recent Synaptics changes in psm(4) (?)
Jan Kokemüller
jan.kokemueller at gmail.com
Sat Sep 7 21:13:07 UTC 2013
The recent psm commit finally fixed the right touchpad button on my laptop.
Thanks to all involved! :)
I was curious about the "ABI problem" with the old patch and did a quick
test:
When I compile this program against the old sys/mouse.h and run it with a
new kernel (>= r255154) I get an error: "ioctl: Inappropriate ioctl for
device". It works fine when mouse.h and the kernel are in sync. I wonder if
the synapticshw struct can be changed at all without breaking the
MOUSE_SYN_GETHWINFO ioctl?
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/mouse.h>
int main() {
int psm_fd = open("/dev/psm0", O_RDONLY);
if (psm_fd == -1) {
perror("open");
return EXIT_FAILURE;
}
synapticshw_t synhw;
if (ioctl(psm_fd, MOUSE_SYN_GETHWINFO, &synhw) == -1) {
perror("ioctl");
return EXIT_FAILURE;
}
printf("synaptics version: %d.%d\n", synhw.infoMajor, synhw.infoMinor);
return EXIT_SUCCESS;
}
More information about the freebsd-x11
mailing list