|
|
3787e6 |
diff -up kbd-1.15.2/man/man8/kbdrate.8.orig kbd-1.15.2/man/man8/kbdrate.8
|
|
|
3787e6 |
--- kbd-1.15.2/man/man8/kbdrate.8.orig 2009-06-07 21:48:42.000000000 +0200
|
|
|
3787e6 |
+++ kbd-1.15.2/man/man8/kbdrate.8 2011-01-05 12:58:34.579706016 +0100
|
|
|
3787e6 |
@@ -22,7 +22,7 @@ Using
|
|
|
3787e6 |
without any options will reset the repeat rate to 10.9 characters per second (cps)
|
|
|
3787e6 |
and the delay to 250 milliseconds (ms) for Intel- and M68K-based systems.
|
|
|
3787e6 |
These are the IBM defaults. On SPARC-based systems it will reset the repeat rate
|
|
|
3787e6 |
-to 5 cps and the delay to 200 ms.
|
|
|
3787e6 |
+to 20 cps and the delay to 200 ms.
|
|
|
3787e6 |
|
|
|
3787e6 |
.SH OPTIONS
|
|
|
3787e6 |
.TP
|
|
|
3787e6 |
@@ -69,3 +69,5 @@ When these ioctls fail an ioport interfa
|
|
|
3787e6 |
.I /etc/rc.local
|
|
|
3787e6 |
.br
|
|
|
3787e6 |
.I /dev/port
|
|
|
3787e6 |
+.br
|
|
|
3787e6 |
+.I /dev/kbd
|
|
|
3787e6 |
diff -up kbd-1.15.2/src/kbdrate.c.orig kbd-1.15.2/src/kbdrate.c
|
|
|
3787e6 |
--- kbd-1.15.2/src/kbdrate.c.orig 2011-01-05 12:53:45.186575833 +0100
|
|
|
3787e6 |
+++ kbd-1.15.2/src/kbdrate.c 2011-01-05 12:57:37.746753646 +0100
|
|
|
3787e6 |
@@ -108,9 +108,12 @@ static int valid_delays[] = { 250, 500,
|
|
|
3787e6 |
|
|
|
3787e6 |
static int
|
|
|
3787e6 |
KDKBDREP_ioctl_ok(double rate, int delay, int silent) {
|
|
|
3787e6 |
+#if defined(KDKBDREP) && !defined(__sparc__)
|
|
|
3787e6 |
/*
|
|
|
3787e6 |
* This ioctl is defined in <linux/kd.h> but is not
|
|
|
3787e6 |
* implemented anywhere - must be in some m68k patches.
|
|
|
3787e6 |
+ * We cannot blindly try unimplemented ioctls on sparc64 -
|
|
|
3787e6 |
+ * the 32<->64bit transition layer does not like it.
|
|
|
3787e6 |
* Since 2.4.9 also on i386.
|
|
|
3787e6 |
*/
|
|
|
3787e6 |
struct my_kbd_repeat kbdrep_s;
|
|
|
3787e6 |
@@ -176,6 +179,9 @@ KDKBDREP_ioctl_ok(double rate, int delay
|
|
|
3787e6 |
rate, kbdrep_s.delay );
|
|
|
3787e6 |
|
|
|
3787e6 |
return 1; /* success! */
|
|
|
3787e6 |
+#else /* no KDKBDREP or __sparc__ */
|
|
|
3787e6 |
+ return 0;
|
|
|
3787e6 |
+#endif /* KDKBDREP */
|
|
|
3787e6 |
}
|
|
|
3787e6 |
|
|
|
3787e6 |
#ifndef KIOCSRATE
|
|
|
3787e6 |
@@ -226,7 +232,7 @@ sigalrmhandler( attr_unused int sig ) {
|
|
|
3787e6 |
int
|
|
|
3787e6 |
main( int argc, char **argv ) {
|
|
|
3787e6 |
#ifdef __sparc__
|
|
|
3787e6 |
- double rate = 5.0; /* Default rate */
|
|
|
3787e6 |
+ double rate = 20.0; /* Default rate */
|
|
|
3787e6 |
int delay = 200; /* Default delay */
|
|
|
3787e6 |
#else
|
|
|
3787e6 |
double rate = 10.9; /* Default rate */
|
|
|
3787e6 |
@@ -277,7 +283,9 @@ main( int argc, char **argv ) {
|
|
|
3787e6 |
|
|
|
3787e6 |
|
|
|
3787e6 |
/* The ioport way */
|
|
|
3787e6 |
+ /* The ioport way - will crash on sparc */
|
|
|
3787e6 |
|
|
|
3787e6 |
+#ifndef __sparc__
|
|
|
3787e6 |
for (i = 0; i < RATE_COUNT; i++)
|
|
|
3787e6 |
if (rate * 10 >= valid_rates[i]) {
|
|
|
3787e6 |
value &= 0x60;
|
|
|
3787e6 |
@@ -340,5 +348,7 @@ main( int argc, char **argv ) {
|
|
|
3787e6 |
valid_rates[value & 0x1f] / 10.0,
|
|
|
3787e6 |
valid_delays[ (value & 0x60) >> 5 ] );
|
|
|
3787e6 |
|
|
|
3787e6 |
+#endif
|
|
|
3787e6 |
+
|
|
|
3787e6 |
return 0;
|
|
|
3787e6 |
}
|