diff options
author | Eric Anholt <anholt@freebsd.org> | 2004-06-16 09:22:17 +0000 |
---|---|---|
committer | Eric Anholt <anholt@freebsd.org> | 2004-06-16 09:22:17 +0000 |
commit | 22bad9474b8822f03f84a8a39edce624bfb9befa (patch) | |
tree | 8b599b118a758a44fe46985b4843fb29d1ae3253 /hw/xfree86/os-support/linux/lnx_io.c | |
parent | 1c133c27ccc1f09b95922fdece3c8d73cc182def (diff) |
DRI XFree86-4_3_99_12-merge importDRI-XFree86-4_3_99_12-merge
Diffstat (limited to 'hw/xfree86/os-support/linux/lnx_io.c')
-rw-r--r-- | hw/xfree86/os-support/linux/lnx_io.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/hw/xfree86/os-support/linux/lnx_io.c b/hw/xfree86/os-support/linux/lnx_io.c index dda1ff8ef..303c6e3d3 100644 --- a/hw/xfree86/os-support/linux/lnx_io.c +++ b/hw/xfree86/os-support/linux/lnx_io.c @@ -90,9 +90,10 @@ KDKBDREP_ioctl_ok(int rate, int delay) { /* don't change, just test */ kbdrep_s.rate = -1; kbdrep_s.delay = -1; - if (ioctl( xf86Info.consoleFd, KDKBDREP, &kbdrep_s )) { + if (ioctl( 0, KDKBDREP, &kbdrep_s )) { return 0; } + /* do the change */ if (rate == 0) /* switch repeat off */ kbdrep_s.rate = 0; @@ -104,7 +105,7 @@ KDKBDREP_ioctl_ok(int rate, int delay) { if (kbdrep_s.delay < 1) kbdrep_s.delay = 1; - if (ioctl( xf86Info.consoleFd, KDKBDREP, &kbdrep_s )) { + if (ioctl( 0, KDKBDREP, &kbdrep_s )) { return 0; } @@ -129,9 +130,8 @@ KIOCSRATE_ioctl_ok(int rate, int delay) { if (kbdrate_s.rate > 50) kbdrate_s.rate = 50; - if (ioctl( fd, KIOCSRATE, &kbdrate_s )) { - return 0; - } + if (ioctl( fd, KIOCSRATE, &kbdrate_s )) + return 0; close( fd ); @@ -143,7 +143,12 @@ KIOCSRATE_ioctl_ok(int rate, int delay) { #undef rate +#if NeedFunctionPrototypes void xf86SetKbdRepeat(char rad) +#else +void xf86SetKbdRepeat(rad) +char rad; +#endif { #ifdef __sparc__ int rate = 500; /* Default rate */ @@ -173,6 +178,7 @@ void xf86SetKbdRepeat(char rad) if (xf86Info.kbdDelay >= 0) delay = xf86Info.kbdDelay; + if(KDKBDREP_ioctl_ok(rate, delay)) /* m68k? */ return; |