[SYSTEM] Apply patch from Debian.
authorAlexey Gladkov <legion@altlinux.org>
Sun, 4 Feb 2007 20:31:30 +0000 (23:31 +0300)
committerAlexey Gladkov <legion@altlinux.org>
Sun, 4 Feb 2007 20:31:30 +0000 (23:31 +0300)
Apply kbdrate_notty.diff patch from Debian distribution.
kbdrate must not fail when not connected to a TTY.
See bug #212770, bugreport and patch provided by Frederic Gaus.
Date: 2004-07-25

Signed-off-by: Alexey Gladkov <legion@altlinux.org>
src/kbdrate.c

index e3020df..dd30bbc 100644 (file)
@@ -116,7 +116,7 @@ KDKBDREP_ioctl_ok(double rate, int delay, int silent) {
        kbdrep_s.period = -1;
        kbdrep_s.delay = -1;
        if (ioctl( 0, KDKBDREP, &kbdrep_s )) {
-               if (errno == EINVAL)
+               if (errno == EINVAL || errno == ENOTTY)
                        return 0;
                perror( "ioctl(KDKBDREP)" );
                exit( 1 );