summaryrefslogtreecommitdiff
blob: 3c4ed71cb367354e5534d933c6a502a3a11b58f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--- a/src/module_pmac.c
+++ b/src/module_pmac.c
@@ -990,7 +990,9 @@
 		}
 	} 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) {
@@ -1025,7 +1027,8 @@
 		}
 	} 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);