|
version 1.5, 2003/11/04 03:14:39
|
version 1.6, 2004/03/03 18:53:41
|
|
|
|
| /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_kbd.c,v 1.4 2003/11/03 05:11:52 tsi Exp $ */ |
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_kbd.c,v 1.5 2003/11/04 03:14:39 tsi Exp $ */ |
| | |
| /* | /* |
| * Copyright (c) 2002 by The XFree86 Project, Inc. | * Copyright (c) 2002 by The XFree86 Project, Inc. |
|
|
|
| #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; |
| } | } |
| | |
|
|
|
| if (pKbd->delay >= 0) | if (pKbd->delay >= 0) |
| delay = pKbd->delay; | delay = pKbd->delay; |
| | |
| if(KDKBDREP_ioctl_ok(rate, delay)) /* m68k? */ |
if(KDKBDREP_ioctl_ok(pInfo->fd, rate, delay)) /* m68k? */ |
| return; | return; |
| | |
| if(KIOCSRATE_ioctl_ok(rate, delay)) /* sparc? */ | if(KIOCSRATE_ioctl_ok(rate, delay)) /* sparc? */ |