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

Re: licensing of commit to XFree86 CVS



Okay, I looked over lnx_kbd.c, there's two thing that sprang to my mind:

 - the ifndef sparc and comment below is obviously wrong, the ioctl is
   implemented in Linux common code, specifically vt_ioctl.c.
 - fd 0 for the ioctl seems bogus. These ioctls are on the console
   device, and to my reading of the X source that would be
   xf86Info.consoleFd (?)

So what about the following unutested patch:


--- lnx_kbd.c~	2004-04-21 21:46:15.633943864 +0200
+++ lnx_kbd.c	2004-04-21 21:46:27.159191760 +0200
@@ -109,15 +109,13 @@
 
 static int
 KDKBDREP_ioctl_ok(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. */
+#if defined(KDKBDREP)
    struct kbd_repeat kbdrep_s;
 
    /* don't change, just test */
    kbdrep_s.rate = -1;
    kbdrep_s.delay = -1;
-   if (ioctl( 0, KDKBDREP, &kbdrep_s )) {
+   if (ioctl( xf86Info.consoleFd, KDKBDREP, &kbdrep_s )) {
        return 0;
    }
 
@@ -132,7 +130,7 @@
    if (kbdrep_s.delay < 1)
      kbdrep_s.delay = 1;
    
-   if (ioctl( 0, KDKBDREP, &kbdrep_s )) {
+   if (ioctl( xf86Info.consoleFd, KDKBDREP, &kbdrep_s )) {
        return 0;
    }
 



Reply to: