]> git.ipfire.org Git - ipfire-3.x.git/blame - kbd/patches/kbd-1.15-sparc.patch
Move all packages to root.
[ipfire-3.x.git] / kbd / patches / kbd-1.15-sparc.patch
CommitLineData
930b9443
MT
1diff -up kbd-1.15/man/man8/kbdrate.8_old kbd-1.15/man/man8/kbdrate.8
2--- kbd-1.15/man/man8/kbdrate.8_old 2008-12-10 14:20:33.000000000 +0100
3+++ kbd-1.15/man/man8/kbdrate.8 2008-12-10 14:41:10.000000000 +0100
4@@ -22,7 +22,7 @@ Using
5 without any options will reset the repeat rate to 10.9 characters per second (cps)
6 and the delay to 250 milliseconds (ms) for Intel- and M68K-based systems.
7 These are the IBM defaults. On SPARC-based systems it will reset the repeat rate
8-to 5 cps and the delay to 200 ms.
9+to 20 cps and the delay to 200 ms.
10
11 .SH OPTIONS
12 .TP
13@@ -69,3 +69,5 @@ When these ioctls fail an ioport interfa
14 .I /etc/rc.local
15 .br
16 .I /dev/port
17+.br
18+.I /dev/kbd
19diff -up kbd-1.15/src/kbdrate.c_old kbd-1.15/src/kbdrate.c
20--- kbd-1.15/src/kbdrate.c_old 2008-12-10 14:00:25.000000000 +0100
21+++ kbd-1.15/src/kbdrate.c 2008-12-10 14:20:11.000000000 +0100
22@@ -77,7 +77,6 @@ beats rebuilding the kernel!
23
24 #ifdef __sparc__
25 #include <asm/param.h>
26-#include <asm/kbio.h>
27 #endif
28
29 #ifndef KDKBDREP
30@@ -109,11 +108,15 @@ static int valid_delays[] = { 250, 500,
31
32 static int
33 KDKBDREP_ioctl_ok(double rate, int delay, int silent) {
34+#if defined(KDKBDREP) && !defined(__sparc__)
35 /*
36 * This ioctl is defined in <linux/kd.h> but is not
37 * implemented anywhere - must be in some m68k patches.
38+ * We cannot blindly try unimplemented ioctls on sparc64 -
39+ * the 32<->64bit transition layer does not like it.
40 * Since 2.4.9 also on i386.
41- */
42+ */
43+
44 struct my_kbd_repeat kbdrep_s;
45
46 /* don't change, just test */
47@@ -177,6 +180,9 @@ KDKBDREP_ioctl_ok(double rate, int delay
48 rate, kbdrep_s.delay );
49
50 return 1; /* success! */
51+#else /* no KDKBDREP or __sparc__ */
52+ return 0;
53+#endif /* KDKBDREP */
54 }
55
56 static int
57@@ -221,7 +227,7 @@ sigalrmhandler( int sig ) {
58 int
59 main( int argc, char **argv ) {
60 #ifdef __sparc__
61- double rate = 5.0; /* Default rate */
62+ double rate = 20.0; /* Default rate */
63 int delay = 200; /* Default delay */
64 #else
65 double rate = 10.9; /* Default rate */
66@@ -272,7 +278,9 @@ main( int argc, char **argv ) {
67
68
69 /* The ioport way */
70+ /* The ioport way - will crash on sparc */
71
72+#ifndef __sparc__
73 for (i = 0; i < RATE_COUNT; i++)
74 if (rate * 10 >= valid_rates[i]) {
75 value &= 0x60;
76@@ -335,5 +343,7 @@ main( int argc, char **argv ) {
77 valid_rates[value & 0x1f] / 10.0,
78 valid_delays[ (value & 0x60) >> 5 ] );
79
80+#endif
81+
82 return 0;
83 }
84diff -up kbd-1.15/src/setleds.c_old kbd-1.15/src/setleds.c
85--- kbd-1.15/src/setleds.c_old 2008-12-10 14:00:02.000000000 +0100
86+++ kbd-1.15/src/setleds.c 2008-12-10 14:00:16.000000000 +0100
87@@ -14,10 +14,6 @@
88 #include "nls.h"
89 #include "version.h"
90
91-#ifdef __sparc__
92-#include <asm/kbio.h>
93-#endif
94-
95 static void
96 usage(void)
97 {