diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-11-30 06:40:14 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-11-30 06:40:14 +0000 |
commit | e541a923d0ba6b58601c669090593a8f303925c1 (patch) | |
tree | f4e671296f1f00ef66ed527b2a3947833e8231cd /sys-apps/usbutils/files | |
parent | Stable on x86; bug #112840 (diff) | |
download | gentoo-2-e541a923d0ba6b58601c669090593a8f303925c1.tar.gz gentoo-2-e541a923d0ba6b58601c669090593a8f303925c1.tar.bz2 gentoo-2-e541a923d0ba6b58601c669090593a8f303925c1.zip |
Add support for newer format types in usb ids file with patch from upstream cvs #111781.
(Portage version: 2.0.53_rc7)
Diffstat (limited to 'sys-apps/usbutils/files')
-rw-r--r-- | sys-apps/usbutils/files/digest-usbutils-0.71-r1 | 1 | ||||
-rw-r--r-- | sys-apps/usbutils/files/usbutils-0.71-new-video-format.patch | 83 |
2 files changed, 84 insertions, 0 deletions
diff --git a/sys-apps/usbutils/files/digest-usbutils-0.71-r1 b/sys-apps/usbutils/files/digest-usbutils-0.71-r1 new file mode 100644 index 000000000000..53fcaeb741e9 --- /dev/null +++ b/sys-apps/usbutils/files/digest-usbutils-0.71-r1 @@ -0,0 +1 @@ +MD5 479d7c7098ef44cc95e7978fd71c712c usbutils-0.71.tar.gz 163811 diff --git a/sys-apps/usbutils/files/usbutils-0.71-new-video-format.patch b/sys-apps/usbutils/files/usbutils-0.71-new-video-format.patch new file mode 100644 index 000000000000..dfcc00a4c94b --- /dev/null +++ b/sys-apps/usbutils/files/usbutils-0.71-new-video-format.patch @@ -0,0 +1,83 @@ +Handle new entry types in usb.ids + +Patch taken from upstream cvs + +http://bugs.gentoo.org/111781 + +--- usbutils/names.c ++++ usbutils/names.c +@@ -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, }; +@@ -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; |