source: patches/kbd-1.15-sparc_kbio-1.patch@ aa020293

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since aa020293 was a65d7f3, checked in by Jim Gifford <clfs@…>, 16 years ago

Added patch to sparc to fix kbd build

  • Property mode set to 100644
File size: 2.7 KB
RevLine 
[a65d7f3]1Submitted By: Jim Gifford (jim at cross-lfs dot org)
2Date: 2009-02-05
3Initial Package Version: 1.15
4Origin: Fedora
5Upstream Status: Unknown
6Description: Sparc Linux Headers doesn't have asm/kbio.h anymore
7
8diff -Naur kbd-1.15.orig/man/man8/kbdrate.8 kbd-1.15/man/man8/kbdrate.8
9--- kbd-1.15.orig/man/man8/kbdrate.8 2008-03-13 09:46:23.000000000 -0700
10+++ kbd-1.15/man/man8/kbdrate.8 2009-02-05 20:18:28.014455370 -0800
11@@ -22,7 +22,7 @@
12 without any options will reset the repeat rate to 10.9 characters per second (cps)
13 and the delay to 250 milliseconds (ms) for Intel- and M68K-based systems.
14 These are the IBM defaults. On SPARC-based systems it will reset the repeat rate
15-to 5 cps and the delay to 200 ms.
16+to 20 cps and the delay to 200 ms.
17
18 .SH OPTIONS
19 .TP
20@@ -69,3 +69,5 @@
21 .I /etc/rc.local
22 .br
23 .I /dev/port
24+.br
25+.I /dev/kbd
26diff -Naur kbd-1.15.orig/src/kbdrate.c kbd-1.15/src/kbdrate.c
27--- kbd-1.15.orig/src/kbdrate.c 2008-03-14 01:03:43.000000000 -0700
28+++ kbd-1.15/src/kbdrate.c 2009-02-05 20:18:28.014455370 -0800
29@@ -77,7 +77,6 @@
30
31 #ifdef __sparc__
32 #include <asm/param.h>
33-#include <asm/kbio.h>
34 #endif
35
36 #ifndef KDKBDREP
37@@ -109,11 +108,15 @@
38
39 static int
40 KDKBDREP_ioctl_ok(double rate, int delay, int silent) {
41+#if defined(KDKBDREP) && !defined(__sparc__)
42 /*
43 * This ioctl is defined in <linux/kd.h> but is not
44 * implemented anywhere - must be in some m68k patches.
45+ * We cannot blindly try unimplemented ioctls on sparc64 -
46+ * the 32<->64bit transition layer does not like it.
47 * Since 2.4.9 also on i386.
48- */
49+ */
50+
51 struct my_kbd_repeat kbdrep_s;
52
53 /* don't change, just test */
54@@ -177,6 +180,9 @@
55 rate, kbdrep_s.delay );
56
57 return 1; /* success! */
58+#else /* no KDKBDREP or __sparc__ */
59+ return 0;
60+#endif /* KDKBDREP */
61 }
62
63 static int
64@@ -221,7 +227,7 @@
65 int
66 main( int argc, char **argv ) {
67 #ifdef __sparc__
68- double rate = 5.0; /* Default rate */
69+ double rate = 20.0; /* Default rate */
70 int delay = 200; /* Default delay */
71 #else
72 double rate = 10.9; /* Default rate */
73@@ -272,7 +278,9 @@
74
75
76 /* The ioport way */
77+ /* The ioport way - will crash on sparc */
78
79+#ifndef __sparc__
80 for (i = 0; i < RATE_COUNT; i++)
81 if (rate * 10 >= valid_rates[i]) {
82 value &= 0x60;
83@@ -335,5 +343,7 @@
84 valid_rates[value & 0x1f] / 10.0,
85 valid_delays[ (value & 0x60) >> 5 ] );
86
87+#endif
88+
89 return 0;
90 }
91diff -Naur kbd-1.15.orig/src/setleds.c kbd-1.15/src/setleds.c
92--- kbd-1.15.orig/src/setleds.c 2008-03-14 01:03:43.000000000 -0700
93+++ kbd-1.15/src/setleds.c 2009-02-05 20:18:28.014455370 -0800
94@@ -14,10 +14,6 @@
95 #include "nls.h"
96 #include "version.h"
97
98-#ifdef __sparc__
99-#include <asm/kbio.h>
100-#endif
101-
102 static void
103 usage(void)
104 {
105
106
Note: See TracBrowser for help on using the repository browser.