summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2002-02-20 20:47:21 +0000
committeralfred <alfred@FreeBSD.org>2002-02-20 20:47:21 +0000
commit7b6d78ef23b57da21a82b7f0c48134c638fc57e6 (patch)
tree28c44908c5eec0bbedb76f3c63bb323089c7df9b /usr.sbin
parent48024c8054d4ccb77bc5d06f954c1d261318798e (diff)
downloadFreeBSD-src-7b6d78ef23b57da21a82b7f0c48134c638fc57e6.zip
FreeBSD-src-7b6d78ef23b57da21a82b7f0c48134c638fc57e6.tar.gz
Prefix structure members to protect them against clashes with eg.
c++ keywords. This keeps us in sync with NetBSD because they actually committed my delta first. Ok'd by: lennard
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/usbd/usbd.c42
-rw-r--r--usr.sbin/usbdevs/usbdevs.c26
2 files changed, 34 insertions, 34 deletions
diff --git a/usr.sbin/usbd/usbd.c b/usr.sbin/usbd/usbd.c
index ff5387d..1541d5f 100644
--- a/usr.sbin/usbd/usbd.c
+++ b/usr.sbin/usbd/usbd.c
@@ -582,23 +582,23 @@ print_event(struct usb_event *event)
printf(" at %ld.%09ld, %s, %s:\n",
timespec->tv_sec, timespec->tv_nsec,
- devinfo->product, devinfo->vendor);
+ devinfo->udi_product, devinfo->udi_vendor);
printf(" vndr=0x%04x prdct=0x%04x rlse=0x%04x "
"clss=0x%04x subclss=0x%04x prtcl=0x%04x\n",
- devinfo->vendorNo, devinfo->productNo,
- devinfo->releaseNo,
- devinfo->class, devinfo->subclass, devinfo->protocol);
+ devinfo->udi_vendorNo, devinfo->udi_productNo,
+ devinfo->udi_releaseNo,
+ devinfo->udi_class, devinfo->udi_subclass, devinfo->udi_protocol);
- if (devinfo->devnames[0][0] != '\0') {
+ if (devinfo->udi_devnames[0][0] != '\0') {
char c = ' ';
printf(" device names:");
for (i = 0; i < USB_MAX_DEVNAMES; i++) {
- if (devinfo->devnames[i][0] == '\0')
+ if (devinfo->udi_devnames[i][0] == '\0')
break;
- printf("%c%s", c, devinfo->devnames[i]);
+ printf("%c%s", c, devinfo->udi_devnames[i]);
c = ',';
}
}
@@ -681,15 +681,15 @@ match_devname(action_t *action, struct usb_device_info *devinfo)
int error;
for (i = 0; i < USB_MAX_DEVNAMES; i++) {
- if (devinfo->devnames[i][0] == '\0')
+ if (devinfo->udi_devnames[i][0] == '\0')
break;
- error = regexec(&action->devname_regex, devinfo->devnames[i],
+ error = regexec(&action->devname_regex, devinfo->udi_devnames[i],
1, &match, 0);
if (error == 0) {
if (verbose >= 2)
printf("%s: %s matches %s\n", __progname,
- devinfo->devnames[i], action->devname);
+ devinfo->udi_devnames[i], action->devname);
return(i);
}
}
@@ -707,17 +707,17 @@ find_action(struct usb_device_info *devinfo, action_match_t *action_match)
STAILQ_FOREACH(action, &actions, next) {
if ((action->vendor == WILDCARD_INT ||
- action->vendor == devinfo->vendorNo) &&
+ action->vendor == devinfo->udi_vendorNo) &&
(action->product == WILDCARD_INT ||
- action->product == devinfo->productNo) &&
+ action->product == devinfo->udi_productNo) &&
(action->release == WILDCARD_INT ||
- action->release == devinfo->releaseNo) &&
+ action->release == devinfo->udi_releaseNo) &&
(action->class == WILDCARD_INT ||
- action->class == devinfo->class) &&
+ action->class == devinfo->udi_class) &&
(action->subclass == WILDCARD_INT ||
- action->subclass == devinfo->subclass) &&
+ action->subclass == devinfo->udi_subclass) &&
(action->protocol == WILDCARD_INT ||
- action->protocol == devinfo->protocol) &&
+ action->protocol == devinfo->udi_protocol) &&
(action->devname == WILDCARD_STRING ||
(match = match_devname(action, devinfo)) != -1)) {
/* found match !*/
@@ -727,16 +727,16 @@ find_action(struct usb_device_info *devinfo, action_match_t *action_match)
* one devname for that device, use that.
*/
if (match >= 0)
- devname = devinfo->devnames[match];
- else if (devinfo->devnames[0][0] != '\0' &&
- devinfo->devnames[1][0] == '\0')
+ devname = devinfo->udi_devnames[match];
+ else if (devinfo->udi_devnames[0][0] != '\0' &&
+ devinfo->udi_devnames[1][0] == '\0')
/* if we have exactly 1 device name */
- devname = devinfo->devnames[0];
+ devname = devinfo->udi_devnames[0];
if (verbose) {
printf("%s: Found action '%s' for %s, %s",
__progname, action->name,
- devinfo->product, devinfo->vendor);
+ devinfo->udi_product, devinfo->udi_vendor);
if (devname)
printf(" at %s", devname);
printf("\n");
diff --git a/usr.sbin/usbdevs/usbdevs.c b/usr.sbin/usbdevs/usbdevs.c
index 26196ec..1d085b7 100644
--- a/usr.sbin/usbdevs/usbdevs.c
+++ b/usr.sbin/usbdevs/usbdevs.c
@@ -78,7 +78,7 @@ usbdev(int f, int a, int 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)
@@ -88,38 +88,38 @@ usbdev(int f, int a, int rec)
printf("addr %d: ", a);
done[a] = 1;
if (verbose) {
- switch (di.speed) {
+ switch (di.udi_speed) {
case USB_SPEED_LOW: printf("low speed, "); break;
case USB_SPEED_FULL: printf("full speed, "); break;
case USB_SPEED_HIGH: printf("high speed, "); break;
default: break;
}
- 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,
OpenPOWER on IntegriCloud