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.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/hw/xfree86/os-support/linux/lnx_io.c b/hw/xfree86/os-support/linux/lnx_io.c
index 8fa27aa08..dda1ff8ef 100644
--- a/hw/xfree86/os-support/linux/lnx_io.c
+++ b/hw/xfree86/os-support/linux/lnx_io.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_io.c,v 3.27 2004/03/03 18:53:41 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_io.c,v 3.25 2003/08/19 17:32:34 tsi Exp $ */
/*
* Copyright 1992 by Orest Zborowski <obz@Kodak.com>
* Copyright 1993 by David Dawes <dawes@xfree86.org>
@@ -81,7 +81,7 @@ xf86GetKbdLeds()
#endif
static int
-KDKBDREP_ioctl_ok(int fd, int rate, int delay) {
+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. */
@@ -90,10 +90,9 @@ KDKBDREP_ioctl_ok(int fd, int rate, int delay) {
/* don't change, just test */
kbdrep_s.rate = -1;
kbdrep_s.delay = -1;
- if (ioctl( fd, 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 fd, int rate, int delay) {
if (kbdrep_s.delay < 1)
kbdrep_s.delay = 1;
- if (ioctl( fd, 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 );
@@ -173,8 +173,7 @@ void xf86SetKbdRepeat(char rad)
if (xf86Info.kbdDelay >= 0)
delay = xf86Info.kbdDelay;
-
- if(KDKBDREP_ioctl_ok(xf86Info.consoleFd, rate, delay)) /* m68k? */
+ if(KDKBDREP_ioctl_ok(rate, delay)) /* m68k? */
return;
if(KIOCSRATE_ioctl_ok(rate, delay)) /* sparc? */