[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#224909: patches grabbed from HEAD



Hi,

attached are two patches grabbed from HEAD, to fix the warnings thrown
out with linux-2.6 kernels - from HEAD's changelog:

XFree86 4.4.99.1 (XX March 2004)
   6. Do the Linux KDKBDREP ioctl on the correct fd.  This prevents the
      fallback that tries to directly program the keyboard repeat rate,
      and the related warning messages that recent Linux kernels generate
      (David Dawes).

I've tested a i386 build with both patches applied - everything works quite normal on my workstation.

 - Christian

--- xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_kbd.c.orig	2004-03-07 21:23:28.000000000 +0100
+++ xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_kbd.c	2004-03-07 21:27:07.000000000 +0100
@@ -111,7 +111,7 @@
 #endif
 
 static int
-KDKBDREP_ioctl_ok(int rate, int delay) {
+KDKBDREP_ioctl_ok(int fd, int rate, int delay) {
 #if defined(KDKBDREP) && !defined(__sparc__)
      /* This ioctl is defined in <linux/kd.h> but is not
 	implemented anywhere - must be in some m68k patches. */
@@ -120,7 +120,7 @@
    /* don't change, just test */
    kbdrep_s.rate = -1;
    kbdrep_s.delay = -1;
-   if (ioctl( 0, KDKBDREP, &kbdrep_s )) {
+   if (ioctl( fd, KDKBDREP, &kbdrep_s )) {
        return 0;
    }
 
@@ -135,7 +135,7 @@
    if (kbdrep_s.delay < 1)
      kbdrep_s.delay = 1;
    
-   if (ioctl( 0, KDKBDREP, &kbdrep_s )) {
+   if (ioctl( fd, KDKBDREP, &kbdrep_s )) {
      return 0;
    }
 
@@ -208,7 +208,7 @@
   if (pKbd->delay >= 0)
     delay = pKbd->delay;
 
-  if(KDKBDREP_ioctl_ok(rate, delay)) 	/* m68k? */
+  if(KDKBDREP_ioctl_ok(pInfo->fd, rate, delay)) 	/* m68k? */
     return;
 
   if(KIOCSRATE_ioctl_ok(rate, delay))	/* sparc? */
--- xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_io.c.orig	2004-03-07 21:19:35.000000000 +0100
+++ xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_io.c	2004-03-07 21:27:07.000000000 +0100
@@ -83,7 +83,7 @@
 #endif
 
 static int
-KDKBDREP_ioctl_ok(int rate, int delay) {
+KDKBDREP_ioctl_ok(int fd, int rate, int delay) {
 #if defined(KDKBDREP) && !defined(__sparc__)
      /* This ioctl is defined in <linux/kd.h> but is not
 	implemented anywhere - must be in some m68k patches. */
@@ -92,7 +92,7 @@
    /* don't change, just test */
    kbdrep_s.rate = -1;
    kbdrep_s.delay = -1;
-   if (ioctl( 0, KDKBDREP, &kbdrep_s )) {
+   if (ioctl( fd, KDKBDREP, &kbdrep_s )) {
        return 0;
    }
 
@@ -107,7 +107,7 @@
    if (kbdrep_s.delay < 1)
      kbdrep_s.delay = 1;
    
-   if (ioctl( 0, KDKBDREP, &kbdrep_s )) {
+   if (ioctl( fd, KDKBDREP, &kbdrep_s )) {
      return 0;
    }
 
@@ -186,7 +186,7 @@
     delay = xf86Info.kbdDelay;
 
 
-  if(KDKBDREP_ioctl_ok(rate, delay)) 	/* m68k? */
+  if(KDKBDREP_ioctl_ok(xf86Info.consoleFd, rate, delay)) 	/* m68k? */
     return;
 
   if(KIOCSRATE_ioctl_ok(rate, delay))	/* sparc? */

Reply to: