|
|
e000e8 |
diff -up kbd-2.0.4/docs/man/man8/kbdrate.8.orig kbd-2.0.4/docs/man/man8/kbdrate.8
|
|
|
e000e8 |
--- kbd-2.0.4/docs/man/man8/kbdrate.8.orig 2017-01-11 11:04:50.114831348 +0100
|
|
|
e000e8 |
+++ kbd-2.0.4/docs/man/man8/kbdrate.8 2017-01-11 11:05:35.619851252 +0100
|
|
|
e000e8 |
@@ -22,7 +22,7 @@ Using
|
|
|
e000e8 |
without any options will reset the repeat rate to 10.9 characters per second (cps)
|
|
|
e000e8 |
and the delay to 250 milliseconds (ms) for Intel- and M68K-based systems.
|
|
|
e000e8 |
These are the IBM defaults. On SPARC-based systems it will reset the repeat rate
|
|
|
e000e8 |
-to 5 cps and the delay to 200 ms.
|
|
|
e000e8 |
+to 20 cps and the delay to 200 ms.
|
|
|
e000e8 |
|
|
|
e000e8 |
.SH OPTIONS
|
|
|
e000e8 |
.TP
|
|
|
e000e8 |
diff -up kbd-2.0.4/src/kbdrate.c.orig kbd-2.0.4/src/kbdrate.c
|
|
|
e000e8 |
--- kbd-2.0.4/src/kbdrate.c.orig 2017-01-11 11:05:10.226840148 +0100
|
|
|
e000e8 |
+++ kbd-2.0.4/src/kbdrate.c 2017-01-11 11:05:56.832860537 +0100
|
|
|
e000e8 |
@@ -111,9 +111,12 @@ static int valid_delays[] = { 250, 500,
|
|
|
e000e8 |
static int
|
|
|
e000e8 |
KDKBDREP_ioctl_ok(double rate, int delay, int silent)
|
|
|
e000e8 |
{
|
|
|
e000e8 |
+#if defined(KDKBDREP) && !defined(__sparc__)
|
|
|
e000e8 |
/*
|
|
|
e000e8 |
* This ioctl is defined in <linux/kd.h> but is not
|
|
|
e000e8 |
* implemented anywhere - must be in some m68k patches.
|
|
|
e000e8 |
+ * We cannot blindly try unimplemented ioctls on sparc64 -
|
|
|
e000e8 |
+ * the 32<->64bit transition layer does not like it.
|
|
|
e000e8 |
* Since 2.4.9 also on i386.
|
|
|
e000e8 |
*/
|
|
|
e000e8 |
struct my_kbd_repeat kbdrep_s;
|
|
|
e000e8 |
@@ -176,6 +179,9 @@ KDKBDREP_ioctl_ok(double rate, int delay
|
|
|
e000e8 |
rate, kbdrep_s.delay);
|
|
|
e000e8 |
|
|
|
e000e8 |
return 1; /* success! */
|
|
|
e000e8 |
+#else /* no KDKBDREP or __sparc__ */
|
|
|
e000e8 |
+ return 0;
|
|
|
e000e8 |
+#endif /* KDKBDREP */
|
|
|
e000e8 |
}
|
|
|
e000e8 |
|
|
|
e000e8 |
#ifndef KIOCSRATE
|
|
|
e000e8 |
@@ -226,7 +232,7 @@ sigalrmhandler(int sig __attribute__((un
|
|
|
e000e8 |
int main(int argc, char **argv)
|
|
|
e000e8 |
{
|
|
|
e000e8 |
#ifdef __sparc__
|
|
|
e000e8 |
- double rate = 5.0; /* Default rate */
|
|
|
e000e8 |
+ double rate = 20.0; /* Default rate */
|
|
|
e000e8 |
int delay = 200; /* Default delay */
|
|
|
e000e8 |
#else
|
|
|
e000e8 |
double rate = 10.9; /* Default rate */
|
|
|
e000e8 |
@@ -275,8 +281,9 @@ int main(int argc, char **argv)
|
|
|
e000e8 |
if (KIOCSRATE_ioctl_ok(rate, delay, silent)) /* sparc? */
|
|
|
e000e8 |
return 0;
|
|
|
e000e8 |
|
|
|
e000e8 |
- /* The ioport way */
|
|
|
e000e8 |
+ /* The ioport way - will crash on sparc */
|
|
|
e000e8 |
|
|
|
e000e8 |
+#ifndef __sparc__
|
|
|
e000e8 |
for (i = 0; i < RATE_COUNT; i++)
|
|
|
e000e8 |
if (rate * 10 >= valid_rates[i]) {
|
|
|
e000e8 |
value &= 0x60;
|
|
|
e000e8 |
@@ -333,5 +340,6 @@ int main(int argc, char **argv)
|
|
|
e000e8 |
valid_rates[value & 0x1f] / 10.0,
|
|
|
e000e8 |
valid_delays[(value & 0x60) >> 5]);
|
|
|
e000e8 |
|
|
|
e000e8 |
+#endif
|
|
|
e000e8 |
return EXIT_SUCCESS;
|
|
|
e000e8 |
}
|