Bug#273733: marked as done (dvb-utils: av7110_loadkeys doesn't allow BTN_*)

Debian Bug Tracking System pkg-vdr-dvb-devel@lists.alioth.debian.org
Wed, 06 Oct 2004 08:48:27 -0700


Your message dated Wed, 06 Oct 2004 11:32:04 -0400
with message-id <E1CFDls-0002nX-00@newraff.debian.org>
and subject line Bug#273733: fixed in linuxtv-dvb-apps 1.1.0-3
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 27 Sep 2004 21:38:06 +0000
>From linux@youmustbejoking.demon.co.uk Mon Sep 27 14:38:06 2004
Return-path: <linux@youmustbejoking.demon.co.uk>
Received: from anchor-post-36.mail.demon.net [194.217.242.86] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1CC3CA-0005Fa-00; Mon, 27 Sep 2004 14:38:06 -0700
Received: from youmustbejoking.demon.co.uk ([212.228.127.8] helo=pentagram.youmustbejoking.demon.co.uk)
	by anchor-post-36.mail.demon.net with esmtp (Exim 4.42)
	id 1CC3C7-000EYB-Kh
	for submit@bugs.debian.org; Mon, 27 Sep 2004 21:38:05 +0000
Received: from riscpc ([192.168.0.2])
	by pentagram.youmustbejoking.demon.co.uk with esmtp (Exim 3.36 #1 (Debian))
	id 1CC2pT-0002oc-00
	for <submit@bugs.debian.org>; Mon, 27 Sep 2004 22:14:39 +0100
Date: Mon, 27 Sep 2004 21:47:49 +0100
From: Darren Salt <linux@youmustbejoking.demon.co.uk>
Message-ID: <4CF52A0802%linux@youmustbejoking.demon.co.uk>
User-Agent: Messenger-Pro/2.72b7 (MsgServe/2.13) (RISC-OS/4.02) POPstar/2.06-ds.2
To: submit@bugs.debian.org
Subject: dvb-utils: av7110_loadkeys doesn't allow BTN_*
X-Editor: Zap 1.46 (24 Sep 2004) ds, ZapEmail 0.28.1 (09 Aug 2004) (32)
X-SDate: Mon, 4045 Sep 1993 21:47:49 +0100
X-Message-Flag: Outlook Express is broken. Upgrade to mail(1).
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="998569252--1729981899--1493879278"
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-6.5 required=4.0 tests=BAYES_10,HAS_PACKAGE 
	autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 

This message is in MIME format which your mailer apparently does not support.
You either require a newer version of your software which supports MIME, or
a separate MIME decoding utility.  Alternatively, ask the sender of this
message to resend it in a different format.

--998569252--1729981899--1493879278
Content-Type: text/plain; charset=us-ascii

Package: dvb-utils
Version: 1.1.0-2
Tags: patch

While adding a keymappings /proc interface to budget_ci and adapting
av7110_loadkeys to work with it, I found that it wouldn't accept key names
which begin with "BTN_". I have a use for these :-)

-- 
| Darren Salt   | nr. Ashington, | linux (or ds) at
| woody, sarge, | Northumberland | youmustbejoking
| RISC OS       | Toon Army      | demon co uk
|   We've got Shearer, you haven't

Enter your personal identification number.

--998569252--1729981899--1493879278
Content-Type: text/plain; charset=iso-8859-1; name="input_keynames.patch"
Content-Disposition: attachment; filename="input_keynames.patch"
Content-Transfer-Encoding: quoted-printable

diff -urNad linuxtv-dvb-apps-1.1.0/util/av7110_loadkeys/Makefile linuxtv-=
dvb-apps-1.1.0/util/av7110_loadkeys/Makefile
--- linuxtv-dvb-apps-1.1.0/util/av7110_loadkeys/Makefile	2004-09-27 19:25=
:17.000000000 +0100
+++ linuxtv-dvb-apps-1.1.0/util/av7110_loadkeys/Makefile	2004-09-27 19:38=
:06.000000000 +0100
@@ -12,7 +12,7 @@
 evtest.o: evtest.c input_keynames.h
=20
=20
-input_keynames.h: /usr/include/linux/input.h input_fake.h
+input_keynames.h: /usr/include/linux/input.h input_fake.h Makefile
 	@echo 'generate $@...'
 	@echo '#ifndef __INPUT_KEYNAMES_H__' > $@
 	@echo '#define __INPUT_KEYNAMES_H__' >> $@
@@ -32,8 +32,17 @@
 	@echo '' >> $@
 	@echo 'static struct input_key_name key_name [] =3D {' >> $@
 	@for x in `cat /usr/include/linux/input.h input_fake.h | \
-	          grep KEY_ | grep "#define" | grep -v KEY_MAX | \
-		  cut -f 1 | cut -f 2 -d ' ' | sort | uniq` ; do \
+	          egrep '#define[ \t]+KEY_' | grep -v KEY_MAX | \
+		  cut -f 1 | cut -f 2 -d ' ' | sort -u` ; do \
+		echo "        { \"`echo $$x | cut -b 5-`\", $$x }," >> $@ \
+		; \
+	done
+	@echo '};' >> $@
+	@echo '' >> $@
+	@echo 'static struct input_key_name btn_name [] =3D {' >> $@
+	@for x in `cat /usr/include/linux/input.h input_fake.h | \
+	          egrep '#define[ \t]+BTN_' | \
+		  cut -f 1 | cut -f 2 -d ' ' | sort -u` ; do \
 		echo "        { \"`echo $$x | cut -b 5-`\", $$x }," >> $@ \
 		; \
 	done
diff -urNad linuxtv-dvb-apps-1.1.0/util/av7110_loadkeys/av7110_loadkeys.c=
 linuxtv-dvb-apps-1.1.0/util/av7110_loadkeys/av7110_loadkeys.c
--- linuxtv-dvb-apps-1.1.0/util/av7110_loadkeys/av7110_loadkeys.c	2004-09=
-27 19:25:17.000000000 +0100
+++ linuxtv-dvb-apps-1.1.0/util/av7110_loadkeys/av7110_loadkeys.c	2004-09=
-27 19:34:25.000000000 +0100
@@ -35,7 +35,8 @@
 {
 	int cmp, index;
 	int l =3D 1;
-	int r =3D sizeof (key_name) / sizeof (key_name[0]);
+	const struct input_key_name *kn;
+	int r;
=20
 	if (limit < 5)
 		return -1;
@@ -46,7 +47,18 @@
 		limit--;
 	}
=20
-	if (pos [0] !=3D 'K' || pos[1] !=3D 'E' || pos[2] !=3D 'Y' || pos[3] !=3D=
 '_')
+	if (pos[3] !=3D '_')
+		return -2;
+
+	if (pos[0] =3D=3D 'K' && pos[1] =3D=3D 'E' && pos[2] =3D=3D 'Y') {
+		kn =3D key_name;
+		r =3D sizeof (key_name) / sizeof (key_name[0]);
+	}
+	else if (pos[0] =3D=3D 'B' && pos[1] =3D=3D 'T' && pos[2] =3D=3D 'N') {=

+		kn =3D btn_name;
+		r =3D sizeof (btn_name) / sizeof (btn_name[0]);
+	}
+	else
 		return -2;
=20
 	(*nend) +=3D 4;
@@ -58,19 +70,19 @@
=20
 		index =3D (l + r) / 2;
 	=09
-		len0 =3D strlen(key_name[index-1].name);
+		len0 =3D strlen(kn[index-1].name);
=20
 		while (len1 < limit && isgraph(pos[len1]))
 			len1++;
=20
-		cmp =3D strncmp (key_name[index-1].name, pos,
-			       strlen(key_name[index-1].name));
+		cmp =3D strncmp (kn[index-1].name, pos,
+			       strlen(kn[index-1].name));
 =09
 		if (len0 < len1 && cmp =3D=3D 0)
 			cmp =3D -1;
=20
 		if (cmp =3D=3D 0) {
-			*nend =3D pos + strlen (key_name[index-1].name);
+			*nend =3D pos + strlen (kn[index-1].name);
=20
 			if (**nend !=3D '\n' &&
 			    **nend !=3D '\t' &&
@@ -78,7 +90,7 @@
 			    *nend !=3D pos)
 				return -3;
=20
-			return key_name[index-1].key;
+			return kn[index-1].key;
 		}
=20
 		if (cmp < 0)

--998569252--1729981899--1493879278--

---------------------------------------
Received: (at 273733-close) by bugs.debian.org; 6 Oct 2004 15:38:04 +0000
>From katie@ftp-master.debian.org Wed Oct 06 08:38:04 2004
Return-path: <katie@ftp-master.debian.org>
Received: from newraff.debian.org [208.185.25.31] (mail)
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1CFDrg-0006fF-00; Wed, 06 Oct 2004 08:38:04 -0700
Received: from katie by newraff.debian.org with local (Exim 3.35 1 (Debian))
	id 1CFDls-0002nX-00; Wed, 06 Oct 2004 11:32:04 -0400
From: Debian VDR Team <pkg-vdr-dvb-devel@lists.alioth.debian.org>
To: 273733-close@bugs.debian.org
X-Katie: $Revision: 1.51 $
Subject: Bug#273733: fixed in linuxtv-dvb-apps 1.1.0-3
Message-Id: <E1CFDls-0002nX-00@newraff.debian.org>
Sender: Archive Administrator <katie@ftp-master.debian.org>
Date: Wed, 06 Oct 2004 11:32:04 -0400
Delivered-To: 273733-close@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
	autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 

Source: linuxtv-dvb-apps
Source-Version: 1.1.0-3

We believe that the bug you reported is fixed in the latest version of
linuxtv-dvb-apps, which is due to be installed in the Debian FTP archive:

dvb-utils_1.1.0-3_i386.deb
  to pool/main/l/linuxtv-dvb-apps/dvb-utils_1.1.0-3_i386.deb
linuxtv-dvb-apps_1.1.0-3.diff.gz
  to pool/main/l/linuxtv-dvb-apps/linuxtv-dvb-apps_1.1.0-3.diff.gz
linuxtv-dvb-apps_1.1.0-3.dsc
  to pool/main/l/linuxtv-dvb-apps/linuxtv-dvb-apps_1.1.0-3.dsc



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 273733@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Debian VDR Team <pkg-vdr-dvb-devel@lists.alioth.debian.org> (supplier of updated linuxtv-dvb-apps package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Tue, 28 Sep 2004 15:50:41 +0200
Source: linuxtv-dvb-apps
Binary: dvb-utils
Architecture: source i386
Version: 1.1.0-3
Distribution: unstable
Urgency: low
Maintainer: Debian VDR Team <pkg-vdr-dvb-devel@lists.alioth.debian.org>
Changed-By: Debian VDR Team <pkg-vdr-dvb-devel@lists.alioth.debian.org>
Description: 
 dvb-utils  - Viewer programs for DVB cards
Closes: 273733
Changes: 
 linuxtv-dvb-apps (1.1.0-3) unstable; urgency=low
 .
   * Thomas Schmidt <thomas.schmidt@in.stud.tu-ilmenau.de>
     - Applied patch from Darren Salt <linux@youmustbejoking.demon.co.uk>
       to allow key names that begin with BTN_* in av7110_loadkeys
       (closes: #273733)
Files: 
 c8e08365c1f45ebc5874daf3c92fc765 725 misc extra linuxtv-dvb-apps_1.1.0-3.dsc
 a7653809b3edbd900a563ba93f4816fd 6931 misc extra linuxtv-dvb-apps_1.1.0-3.diff.gz
 6fae63db3b889eb12273ecf199504aa3 65038 misc extra dvb-utils_1.1.0-3_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBZAyBgeVih7XOVJcRAtY7AJ4yt3RFtsJaQ2tbWQOCXOio9EQhwwCgkHvX
ZpFWJK349yZ0ijSsdrEnJ9s=
=6Uzp
-----END PGP SIGNATURE-----