Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37816107
en ru br
ALT Linux repositórios
S:2.6.1-alt1
5.0: 1.14.1.20081023-alt1
4.1: 1.13.99-alt5.M41.1
4.0: 1.12.1-alt2
3.0: 1.12-alt2.1
+updates:1.12-alt2.2

Group :: Terminais
RPM: kbd

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: kbd-1.08-sparc.patch
Download


Don't try unimplemented ioctls on SPARC, even if they
are defined in headers -- that way lies madness.
--- kbd-1.08/man/man8/kbdrate.8	2002-10-11 07:08:58.000000000 -0400
+++ kbd-1.08/man/man8/kbdrate.8	2002-11-22 17:28:15.000000000 -0500
@@ -22,7 +22,7 @@
 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
@@ -69,3 +69,5 @@
 .I /etc/rc.local
 .br
 .I /dev/port
+.br
+.I /dev/kbd
--- kbd-1.08/src/kbdrate.c	2002-10-11 07:09:01.000000000 -0400
+++ kbd-1.08/src/kbdrate.c	2002-11-22 17:34:48.000000000 -0500
@@ -104,8 +104,11 @@
 
 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. */
+	   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. */
 	struct kbd_repeat kbdrep_s;
 
 	/* don't change, just test */
@@ -150,6 +153,9 @@
 			rate, kbdrep_s.delay );
 
 	return 1;			/* success! */
+#else /* no KDKBDREP or __sparc__ */
+	return 0;
+#endif /* KDKBDREP */
 }
 
 static int
@@ -188,7 +194,7 @@
 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 */
@@ -238,8 +244,9 @@
 		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;
@@ -285,5 +292,7 @@
 			valid_rates[value & 0x1f] / 10.0,
 			valid_delays[ (value & 0x60) >> 5 ] );
 
+#endif
+
 	return 0;
 }
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009