67 lines
2.2 KiB
Diff
67 lines
2.2 KiB
Diff
diff -up kbd-2.0.3/docs/man/man8/kbdrate.8.orig kbd-2.0.3/docs/man/man8/kbdrate.8
|
|
--- kbd-2.0.3/docs/man/man8/kbdrate.8.orig 2015-07-14 13:42:43.799261110 +0200
|
|
+++ kbd-2.0.3/docs/man/man8/kbdrate.8 2015-07-14 13:43:30.213459824 +0200
|
|
@@ -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.
|
|
|
|
.SH OPTIONS
|
|
.TP
|
|
diff -up kbd-2.0.3/src/kbdrate.c.orig kbd-2.0.3/src/kbdrate.c
|
|
--- kbd-2.0.3/src/kbdrate.c.orig 2015-07-14 13:43:49.463542240 +0200
|
|
+++ kbd-2.0.3/src/kbdrate.c 2015-07-14 13:46:55.797330678 +0200
|
|
@@ -109,9 +109,12 @@ static int valid_delays[] = { 250, 500,
|
|
|
|
static int
|
|
KDKBDREP_ioctl_ok(double rate, int delay, int silent) {
|
|
+#if defined(KDKBDREP) && !defined(__sparc__)
|
|
/*
|
|
* This ioctl is defined in <linux/kd.h> but is not
|
|
* implemented anywhere - must be in some m68k patches.
|
|
+ * We cannot blindly try unimplemented ioctls on sparc64 -
|
|
+ * the 32<->64bit transition layer does not like it.
|
|
* Since 2.4.9 also on i386.
|
|
*/
|
|
struct my_kbd_repeat kbdrep_s;
|
|
@@ -174,6 +177,9 @@ KDKBDREP_ioctl_ok(double rate, int delay
|
|
rate, kbdrep_s.delay );
|
|
|
|
return 1; /* success! */
|
|
+#else /* no KDKBDREP or __sparc__ */
|
|
+ return 0;
|
|
+#endif /* KDKBDREP */
|
|
}
|
|
|
|
#ifndef KIOCSRATE
|
|
@@ -222,7 +228,7 @@ sigalrmhandler(int sig __attribute__ ((u
|
|
int
|
|
main( int argc, char **argv ) {
|
|
#ifdef __sparc__
|
|
- double rate = 5.0; /* Default rate */
|
|
+ double rate = 20.0; /* Default rate */
|
|
int delay = 200; /* Default delay */
|
|
#else
|
|
double rate = 10.9; /* Default rate */
|
|
@@ -272,8 +278,9 @@ main( int argc, char **argv ) {
|
|
return 0;
|
|
|
|
|
|
- /* The ioport way */
|
|
+ /* The ioport way - will crash on sparc */
|
|
|
|
+#ifndef __sparc__
|
|
for (i = 0; i < RATE_COUNT; i++)
|
|
if (rate * 10 >= valid_rates[i]) {
|
|
value &= 0x60;
|
|
@@ -331,5 +338,7 @@ main( int argc, char **argv ) {
|
|
valid_rates[value & 0x1f] / 10.0,
|
|
valid_delays[ (value & 0x60) >> 5 ] );
|
|
|
|
+#endif
|
|
+
|
|
return EXIT_SUCCESS;
|
|
}
|