Группа :: Терминалы
Пакет: kbd
Главная Изменения Спек Патчи Загрузить Bugs and FR
Патч: kbdrate_notty.diff
#! /bin/sh -e
## 30_kbdrate_notty.dpatch by Denis Barbier <barbier@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Description: kbdrate must not fail when not connected to a TTY.
## DP: See bug #212770, bugreport and patch provided by Frederic Gaus.
## DP: Date: 2004-07-25
if [ $# -lt 1 ]; then
echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
exit 1
fi
[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
case "$1" in
-patch) patch -p1 ${patch_opts} < $0;;
-unpatch) patch -R -p1 ${patch_opts} < $0;;
*)
echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
exit 1;;
esac
exit 0
--- kbd-1.12.orig/src/kbdrate.c
+++ kbd-1.12/src/kbdrate.c
@@ -112,7 +112,7 @@
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 );