Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb usbd_devinfo_vp(): search the know devs array al...
details: https://anonhg.NetBSD.org/src/rev/492a75d750c7
branches: trunk
changeset: 482734:492a75d750c7
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Sun Feb 20 14:45:05 2000 +0000
description:
usbd_devinfo_vp(): search the know devs array also if the device
doesn't return product description (e.g. Kye's Genius NetScroll
mouse returns vendor, but not product); the strings
returned by device are still preferred to those in the array, though
diffstat:
sys/dev/usb/usb_subr.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diffs (35 lines):
diff -r be9437426b13 -r 492a75d750c7 sys/dev/usb/usb_subr.c
--- a/sys/dev/usb/usb_subr.c Sun Feb 20 14:44:30 2000 +0000
+++ b/sys/dev/usb/usb_subr.c Sun Feb 20 14:45:05 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: usb_subr.c,v 1.65 2000/02/02 07:34:00 augustss Exp $ */
+/* $NetBSD: usb_subr.c,v 1.66 2000/02/20 14:45:05 jdolecek Exp $ */
/* $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $ */
/*
@@ -233,7 +233,7 @@
vendor = usbd_get_string(dev, udd->iManufacturer, v);
product = usbd_get_string(dev, udd->iProduct, p);
#ifdef USBVERBOSE
- if (vendor == NULL) {
+ if (vendor == NULL || product == NULL) {
for(kdp = usb_knowndevs;
kdp->vendorname != NULL;
kdp++) {
@@ -242,11 +242,11 @@
(kdp->flags & USB_KNOWNDEV_NOPROD) != 0))
break;
}
- if (kdp->vendorname == NULL)
- vendor = product = NULL;
- else {
- vendor = kdp->vendorname;
- product = (kdp->flags & USB_KNOWNDEV_NOPROD) == 0 ?
+ if (kdp->vendorname != NULL) {
+ if (!vendor)
+ vendor = kdp->vendorname;
+ if (!product)
+ product = (kdp->flags & USB_KNOWNDEV_NOPROD) == 0 ?
kdp->productname : NULL;
}
}
Home |
Main Index |
Thread Index |
Old Index