Re: function key usage switched
On Sat, Jun 16, 2007 at 06:28:21PM +0200, Elimar Riesebieter wrote:
> File a bug against pbbuttonsd then.
> #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
> #define PATH_FNMODE "/sys/module/hid/parameters/pb_fnmode"
> #else
> #define PATH_FNMODE "/sys/module/usbhid/parameters/pb_fnmode"
… which would make the path depending on the linux-headers version.
Better, pbbuttonsd should do something like this:
struct stat st;
const char *path;
int fd;
if (stat("/sys/module/usbhid/parameters/pb_fnmode", &st) == 0) {
path = "/sys/module/usbhid/parameters/pb_fnmode";
} else {
path = "/sys/module/hid/parameters/pb_fnmode";
}
fd = open(path, O_RDONLY);
Greets,
Michael
--
http://hansmi.ch/
Reply to: