|
version 3.26, 2003/11/17 22:20:41
|
version 3.27, 2004/03/03 18:53:41
|
|
|
|
| /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_io.c,v 3.25 2003/08/19 17:32:34 tsi Exp $ */ |
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_io.c,v 3.26 2003/11/17 22:20:41 dawes Exp $ */ |
| /* | /* |
| * Copyright 1992 by Orest Zborowski <obz@Kodak.com> | * Copyright 1992 by Orest Zborowski <obz@Kodak.com> |
| * Copyright 1993 by David Dawes <dawes@xfree86.org> | * Copyright 1993 by David Dawes <dawes@xfree86.org> |
|
|
|
| #endif | #endif |
| | |
| static int | static int |
| KDKBDREP_ioctl_ok(int rate, int delay) { |
KDKBDREP_ioctl_ok(int fd, int rate, int delay) { |
| #if defined(KDKBDREP) && !defined(__sparc__) | #if defined(KDKBDREP) && !defined(__sparc__) |
| /* This ioctl is defined in <linux/kd.h> but is not | /* 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. */ |
|
|
|
| /* don't change, just test */ | /* don't change, just test */ |
| kbdrep_s.rate = -1; | kbdrep_s.rate = -1; |
| kbdrep_s.delay = -1; | kbdrep_s.delay = -1; |
| if (ioctl( 0, KDKBDREP, &kbdrep_s )) { |
if (ioctl( fd, KDKBDREP, &kbdrep_s )) { |
| return 0; | return 0; |
| } | } |
| | |
|
|
|
| if (kbdrep_s.delay < 1) | if (kbdrep_s.delay < 1) |
| kbdrep_s.delay = 1; | kbdrep_s.delay = 1; |
| | |
| if (ioctl( 0, KDKBDREP, &kbdrep_s )) { |
if (ioctl( fd, KDKBDREP, &kbdrep_s )) { |
| return 0; | return 0; |
| } | } |
| | |
|
|
|
| delay = xf86Info.kbdDelay; | delay = xf86Info.kbdDelay; |
| | |
| | |
| if(KDKBDREP_ioctl_ok(rate, delay)) /* m68k? */ |
if(KDKBDREP_ioctl_ok(xf86Info.consoleFd, rate, delay)) /* m68k? */ |
| return; | return; |
| | |
| if(KIOCSRATE_ioctl_ok(rate, delay)) /* sparc? */ | if(KIOCSRATE_ioctl_ok(rate, delay)) /* sparc? */ |