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