diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-01-04 16:49:21 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-01-04 16:49:21 +0000 |
commit | 24a2c83c27af13b1d16e3c8a06fc6a5991303e68 (patch) | |
tree | 1cba6b2fd32e8f2313d6b9ae0eeff0d2ca7aee4d /sys-apps/usbutils/files | |
parent | Adding missing IUSE (diff) | |
download | gentoo-2-24a2c83c27af13b1d16e3c8a06fc6a5991303e68.tar.gz gentoo-2-24a2c83c27af13b1d16e3c8a06fc6a5991303e68.tar.bz2 gentoo-2-24a2c83c27af13b1d16e3c8a06fc6a5991303e68.zip |
old
Diffstat (limited to 'sys-apps/usbutils/files')
-rw-r--r-- | sys-apps/usbutils/files/usbutils-0.71-new-video-format.patch | 83 |
1 files changed, 0 insertions, 83 deletions
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 deleted file mode 100644 index dfcc00a4c94b..000000000000 --- a/sys-apps/usbutils/files/usbutils-0.71-new-video-format.patch +++ /dev/null @@ -1,83 +0,0 @@ -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; |