Date: Sat, 7 Sep 2013 23:13:06 +0200 From: =?ISO-8859-1?Q?Jan_Kokem=FCller?= <jan.kokemueller@gmail.com> To: freebsd-x11@freebsd.org Subject: Kernel ABI problem after recent Synaptics changes in psm(4) (?) Message-ID: <CAMog33q-9u-72dE9rQJ_PJA9WYKd6SCv8%2BNKjMRHbpfYjCKFMA@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAMog33q-9u-72dE9rQJ_PJA9WYKd6SCv8%2BNKjMRHbpfYjCKFMA>