summaryrefslogtreecommitdiff
path: root/hw/xfree86/os-support/linux/lnx_io.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xfree86/os-support/linux/lnx_io.c')
-rw-r--r--hw/xfree86/os-support/linux/lnx_io.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/hw/xfree86/os-support/linux/lnx_io.c b/hw/xfree86/os-support/linux/lnx_io.c
index 303c6e3d3..dda1ff8ef 100644
--- a/hw/xfree86/os-support/linux/lnx_io.c
+++ b/hw/xfree86/os-support/linux/lnx_io.c
@@ -90,10 +90,9 @@ KDKBDREP_ioctl_ok(int rate, int delay) {
/* 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;
}
-
/* do the change */
if (rate == 0) /* switch repeat off */
kbdrep_s.rate = 0;
@@ -105,7 +104,7 @@ KDKBDREP_ioctl_ok(int rate, int delay) {
if (kbdrep_s.delay < 1)
kbdrep_s.delay = 1;
- if (ioctl( 0, KDKBDREP, &kbdrep_s )) {
+ if (ioctl( xf86Info.consoleFd, KDKBDREP, &kbdrep_s )) {
return 0;
}
@@ -130,8 +129,9 @@ 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,12 +143,7 @@ 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 */
@@ -178,7 +173,6 @@ char rad;
if (xf86Info.kbdDelay >= 0)
delay = xf86Info.kbdDelay;
-
if(KDKBDREP_ioctl_ok(rate, delay)) /* m68k? */
return;