From 2ed58c8b7b5521d4672cb876d55ac866d5903b83 Mon Sep 17 00:00:00 2001 From: Alexey Gladkov Date: Mon, 25 Jun 2007 01:15:06 +0400 Subject: [PATCH] Revert "[SYSTEM] Apply patch from Fedora." This reverts commit c4fda9e961604b2d42a6bbd7519b0dde501794a6. --- man/man8/kbdrate.8 | 4 +--- src/kbdrate.c | 16 ++++------------ src/setleds.c | 4 ++++ 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/man/man8/kbdrate.8 b/man/man8/kbdrate.8 index 16d22a3..e0fd890 100644 --- a/man/man8/kbdrate.8 +++ b/man/man8/kbdrate.8 @@ -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 diff --git a/src/kbdrate.c b/src/kbdrate.c index b1c9c1e..5b69d1f 100644 --- a/src/kbdrate.c +++ b/src/kbdrate.c @@ -77,6 +77,7 @@ beats rebuilding the kernel! #ifdef __sparc__ #include +#include #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 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; } diff --git a/src/setleds.c b/src/setleds.c index bb66202..ca4cf3b 100644 --- a/src/setleds.c +++ b/src/setleds.c @@ -14,6 +14,10 @@ #include "nls.h" #include "version.h" +#ifdef __sparc__ +#include +#endif + static void usage(void) { -- 2.7.4