Revert "[SYSTEM] Apply patch from Fedora."
authorAlexey Gladkov <legion@altlinux.org>
Sun, 24 Jun 2007 21:15:06 +0000 (01:15 +0400)
committerAlexey Gladkov <legion@altlinux.org>
Sun, 24 Jun 2007 21:15:06 +0000 (01:15 +0400)
This reverts commit c4fda9e961604b2d42a6bbd7519b0dde501794a6.

man/man8/kbdrate.8
src/kbdrate.c
src/setleds.c

index 16d22a3..e0fd890 100644 (file)
@@ -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 20 cps and the delay to 200 ms.
+to 5 cps and the delay to 200 ms.
 
 .SH OPTIONS
 .TP
@@ -69,5 +69,3 @@ When these ioctls fail an ioport interface as on i386 is assumed.
 .I /etc/rc.local
 .br
 .I /dev/port
-.br
-.I /dev/kbd
index b1c9c1e..5b69d1f 100644 (file)
@@ -77,6 +77,7 @@ beats rebuilding the kernel!
 
 #ifdef __sparc__
 #include <asm/param.h>
+#include <asm/kbio.h>
 #endif
 
 #ifndef KDKBDREP
@@ -105,11 +106,8 @@ static int valid_delays[] = { 250, 500, 750, 1000 };
 
 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. */
+          implemented anywhere - must be in some m68k patches. */
        struct kbd_repeat kbdrep_s;
 
        /* don't change, just test */
@@ -154,9 +152,6 @@ KDKBDREP_ioctl_ok(double rate, int delay, int silent) {
                        rate, kbdrep_s.delay );
 
        return 1;                       /* success! */
-#else /* no KDKBDREP or __sparc__ */
-       return 0;
-#endif /* KDKBDREP */
 }
 
 static int
@@ -201,7 +196,7 @@ sigalrmhandler( int sig ) {
 int
 main( int argc, char **argv ) {
 #ifdef __sparc__
-       double      rate = 20.0;      /* Default rate */
+       double      rate = 5.0;      /* Default rate */
        int         delay = 200;     /* Default delay */
 #else
        double      rate = 10.9;     /* Default rate */
@@ -251,9 +246,8 @@ main( int argc, char **argv ) {
                return 0;
 
 
-       /* The ioport way - will crash on sparc */
+       /* The ioport way */
 
-#ifndef __sparc__
        for (i = 0; i < RATE_COUNT; i++)
                if (rate * 10 >= valid_rates[i]) {
                        value &= 0x60;
@@ -316,7 +310,5 @@ main( int argc, char **argv ) {
                        valid_rates[value & 0x1f] / 10.0,
                        valid_delays[ (value & 0x60) >> 5 ] );
 
-#endif
-
        return 0;
 }
index bb66202..ca4cf3b 100644 (file)
 #include "nls.h"
 #include "version.h"
 
+#ifdef __sparc__
+#include <asm/kbio.h>
+#endif
+
 static void
 usage(void)
 {