void-packages/srcpkgs/pbbuttonsd/patches/008-fnmode.patch

31 lines
1.2 KiB
Diff

Description: pbbuttonsd, fnmode and kernel 2.6.28
Author: Joseph Jezak <josejx@gentoo.org>
Bug-Debian: http://bugs.debian.org/786532
Reviewed-By: Mathieu Malaterre <malat@debian.org>
Index: pbbuttonsd-0.8.1/src/module_pmac.c
===================================================================
--- pbbuttonsd-0.8.1.orig/src/module_pmac.c
+++ pbbuttonsd-0.8.1/src/module_pmac.c
@@ -991,7 +991,9 @@ keyboard_get_config ()
}
} else {
if ((fd = open ("/sys/module/usbhid/parameters/pb_fnmode", O_RDONLY)) < 0)
- fd = open ("/sys/module/hid/parameters/pb_fnmode", O_RDONLY);
+ if ((fd = open ("/sys/module/hid/parameters/pb_fnmode", O_RDONLY)) < 0)
+ fd = open("/sys/module/hid_apple/parameters/fnmode", O_RDONLY);
+
if (fd >= 0) {
if ((n = read (fd, ADBBuffer, ADB_BUFSIZE-1)) > 0) {
@@ -1026,7 +1028,8 @@ keyboard_set_config (int config)
}
} else {
if ((fd = open ("/sys/module/usbhid/parameters/pb_fnmode", O_WRONLY)) < 0)
- fd = open ("/sys/module/hid/parameters/pb_fnmode", O_WRONLY);
+ if ((fd = open ("/sys/module/hid/parameters/pb_fnmode", O_WRONLY)) < 0)
+ fd = open ("/sys/module/hid_apple/parameters/fnmode", O_WRONLY);
if (fd >= 0) {
sprintf ((char*)ADBBuffer, "%d", config);