rpms/usbutils/devel usbutils-0.71-VT.patch, NONE, 1.1 usbutils.spec, 1.18, 1.19

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Wed Mar 1 16:58:39 UTC 2006


Author: karsten

Update of /cvs/dist/rpms/usbutils/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv13663

Modified Files:
	usbutils.spec 
Added Files:
	usbutils-0.71-VT.patch 
Log Message:
 - add usbutils-0.71-VT.patch to fix warnings about unknown lines
   (#176903)


usbutils-0.71-VT.patch:
 names.c |   58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 58 insertions(+)

--- NEW FILE usbutils-0.71-VT.patch ---
--- usbutils-0.71/names.c	2005-01-23 00:03:47.000000000 +0100
+++ usbutils-0.72/names.c	2005-10-22 07:59:50.000000000 +0200
@@ -79,6 +79,12 @@
 	char name[1];
 };
 
+struct videoterminal {
+	struct videoterminal *next;
+	u_int16_t termt;
+	char name[1];
+};
+
 struct genericstrtable {
         struct genericstrtable *next;
         unsigned int num;
@@ -109,6 +115,7 @@
 static struct subclass *subclasses[HASHSZ] = { NULL, };
 static struct protocol *protocols[HASHSZ] = { NULL, };
 static struct audioterminal *audioterminals[HASHSZ] = { NULL, };
+static struct videoterminal *videoterminals[HASHSZ] = { NULL, };
 static struct genericstrtable *hiddescriptors[HASHSZ] = { NULL, };
 static struct genericstrtable *reports[HASHSZ] = { NULL, };
 static struct genericstrtable *huts[HASHSZ] = { NULL, };
@@ -236,6 +243,17 @@
 	return NULL;
 }
 
+const char *names_videoterminal(u_int16_t termt)
+{
+	struct videoterminal *vt;
+
+	vt = videoterminals[hashnum(termt)];
+	for (; vt; vt = vt->next)
+		if (vt->termt == termt)
+			return vt->name;
+	return NULL;
+}
+
 /* ---------------------------------------------------------------------- */
 
 static int new_vendor(const char *name, u_int16_t vendorid)
@@ -356,6 +374,25 @@
 	return 0;
 }
 
+static int new_videoterminal(const char *name, u_int16_t termt)
+{
+	struct videoterminal *vt;
+	unsigned int h = hashnum(termt);
+
+	vt = videoterminals[h];
+	for (; vt; vt = vt->next)
+		if (vt->termt == termt)
+			return -1;
+	vt = malloc(sizeof(struct videoterminal) + strlen(name));
+	if (!vt)
+		return -1;
+	strcpy(vt->name, name);
+	vt->termt = termt;
+	vt->next = videoterminals[h];
+	videoterminals[h] = vt;
+	return 0;
+}
+
 static int new_genericstrtable(struct genericstrtable *t[HASHSZ], const char *name, unsigned int index)
 {
         struct genericstrtable *g;
@@ -564,6 +601,27 @@
 			DBG(printf("line %5u audio terminal type %02x %s\n", linectr, u, cp));
 			continue;
 		}
+		if (buf[0] == 'V' && buf[1] == 'T' && isspace(buf[2])) {
+			/* video terminal type spec */
+			cp = buf+3;
+			while (isspace(*cp))
+				cp++;
+			if (!isxdigit(*cp)) {
+				fprintf(stderr, "Invalid video terminal type at line %u\n", linectr);
+				continue;
+			}
+			u = strtoul(cp, &cp, 16);
+			while (isspace(*cp))
+				cp++;
+			if (!*cp) {
+				fprintf(stderr, "Invalid video terminal type at line %u\n", linectr);
+				continue;
+			}
+			if (new_videoterminal(cp, u))
+				fprintf(stderr, "Duplicate video terminal type spec at line %u terminal type %04x %s\n", linectr, u, cp);
+			DBG(printf("line %5u video terminal type %02x %s\n", linectr, u, cp));
+			continue;
+		}
 		if (buf[0] == 'H' && buf[1] == 'C' && buf[2] == 'C' && isspace(buf[3])) {
 			/* HID Descriptor bCountryCode */
                         cp =  buf+3;


Index: usbutils.spec
===================================================================
RCS file: /cvs/dist/rpms/usbutils/devel/usbutils.spec,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- usbutils.spec	11 Feb 2006 05:55:57 -0000	1.18
+++ usbutils.spec	1 Mar 2006 16:58:37 -0000	1.19
@@ -1,8 +1,9 @@
 Name: usbutils
 Version: 0.71
-Release: 1.2
+Release: 2
 Source:	http://prdownloads.sourceforge.net/linux-usb/%{name}-%{version}.tar.gz
 Patch1: usbutils-0.70-hwdata.patch
+Patch2: usbutils-0.71-VT.patch
 URL: http://www.linux-usb.org/
 License: GPL
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
@@ -20,6 +21,7 @@
 %prep
 %setup -q
 %patch1 -p1 -b .hwdata
+%patch2 -p1 -b .vt
 
 %build
 cp /usr/share/libtool/config.{sub,guess} .
@@ -47,6 +49,10 @@
 rm -rf $RPM_BUILD_ROOT
 
 %changelog
+* Wed Mar 01 2006 Karsten Hopp <karsten at redhat.de> 1.71-2
+- add usbutils-0.71-VT.patch to fix warnings about unknown lines
+  (#176903)
+
 * Fri Feb 10 2006 Jesse Keating <jkeating at redhat.com> - 0.71-1.2
 - bump again for double-long bug on ppc(64)
 




More information about the fedora-cvs-commits mailing list