diff options
author | Nathan Binkert <nate@cvs.openbsd.org> | 2002-05-02 20:12:08 +0000 |
---|---|---|
committer | Nathan Binkert <nate@cvs.openbsd.org> | 2002-05-02 20:12:08 +0000 |
commit | f07d7c31ba96273b45789c7dc139aa7f7949c5b7 (patch) | |
tree | bc509479859adb833173f259e27a8359bc66a627 /usr.sbin/usbdevs/usbdevs.c | |
parent | 587cdcf5ce16c5aed5152f0f3d18dd160f0b0298 (diff) |
userland portion of prefixing usb structure members to avoid name clashes.
From NetBSD
Diffstat (limited to 'usr.sbin/usbdevs/usbdevs.c')
-rw-r--r-- | usr.sbin/usbdevs/usbdevs.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/usr.sbin/usbdevs/usbdevs.c b/usr.sbin/usbdevs/usbdevs.c index 6fa3d0d4e51..8a07c829b4f 100644 --- a/usr.sbin/usbdevs/usbdevs.c +++ b/usr.sbin/usbdevs/usbdevs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: usbdevs.c,v 1.3 2002/02/16 21:28:10 millert Exp $ */ +/* $OpenBSD: usbdevs.c,v 1.4 2002/05/02 20:12:07 nate Exp $ */ /* $NetBSD: usbdevs.c,v 1.11 1999/09/08 02:39:36 augustss Exp $ */ /* @@ -80,7 +80,7 @@ usbdev(f, a, rec) struct usb_device_info di; int e, p, i; - di.addr = a; + di.udi_addr = a; e = ioctl(f, USB_DEVICEINFO, &di); if (e) { if (errno != ENXIO) @@ -90,34 +90,34 @@ usbdev(f, a, rec) printf("addr %d: ", a); done[a] = 1; if (verbose) { - if (di.lowspeed) + if (di.udi_lowspeed) printf("low speed, "); - if (di.power) - printf("power %d mA, ", di.power); + if (di.udi_power) + printf("power %d mA, ", di.udi_power); else printf("self powered, "); - if (di.config) - printf("config %d, ", di.config); + if (di.udi_config) + printf("config %d, ", di.udi_config); else printf("unconfigured, "); } if (verbose) { printf("%s(0x%04x), %s(0x%04x), rev %s", - di.product, di.productNo, - di.vendor, di.vendorNo, di.release); + di.udi_product, di.udi_productNo, + di.udi_vendor, di.udi_vendorNo, di.udi_release); } else - printf("%s, %s", di.product, di.vendor); + printf("%s, %s", di.udi_product, di.udi_vendor); printf("\n"); if (showdevs) { for (i = 0; i< USB_MAX_DEVNAMES; i++) - if (di.devnames[i][0]) + if (di.udi_devnames[i][0]) printf("%*s %s\n", indent, "", - di.devnames[i]); + di.udi_devnames[i]); } if (!rec) return; - for (p = 0; p < di.nports; p++) { - int s = di.ports[p]; + for (p = 0; p < di.udi_nports; p++) { + int s = di.udi_ports[p]; if (s >= USB_MAX_DEVICES) { if (verbose) { printf("%*sport %d %s\n", indent+1, "", p+1, |