summaryrefslogtreecommitdiffstats
path: root/usr.sbin/usbd/usbd.c
diff options
context:
space:
mode:
authorjoe <joe@FreeBSD.org>2002-01-02 20:16:53 +0000
committerjoe <joe@FreeBSD.org>2002-01-02 20:16:53 +0000
commitdc37dfab7839bf806e8b708af3594f4351d24c83 (patch)
tree0606c3163a777ae4d4d6ebf432595414516a660e /usr.sbin/usbd/usbd.c
parent59ca9f3607038f6a0ace86a98f6ca9a484836e7f (diff)
downloadFreeBSD-src-dc37dfab7839bf806e8b708af3594f4351d24c83.zip
FreeBSD-src-dc37dfab7839bf806e8b708af3594f4351d24c83.tar.gz
Sync usb.h with NetBSD, apart from usb_device_info.speed, which
requires logic changes. For now leave it as usb_device_info.lowspeed. It will get addressed when the usb.c code is sync'd.
Diffstat (limited to 'usr.sbin/usbd/usbd.c')
-rw-r--r--usr.sbin/usbd/usbd.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/usr.sbin/usbd/usbd.c b/usr.sbin/usbd/usbd.c
index 7697196..967a80b 100644
--- a/usr.sbin/usbd/usbd.c
+++ b/usr.sbin/usbd/usbd.c
@@ -109,8 +109,8 @@ typedef struct event_name_s {
} event_name_t;
event_name_t event_names[] = {
- {USB_EVENT_ATTACH, "attach"},
- {USB_EVENT_DETACH, "detach"},
+ {USB_EVENT_CTRLR_ATTACH, "attach"},
+ {USB_EVENT_CTRLR_DETACH, "detach"},
{0, NULL} /* NULL indicates end of list, not 0 */
};
@@ -560,7 +560,7 @@ print_event(struct usb_event *event)
{
int i;
struct timespec *timespec = &event->ue_time;
- struct usb_device_info *devinfo = &event->ue_device;
+ struct usb_device_info *devinfo = &event->u.ue_device;
printf("%s: ", __progname);
for (i = 0; event_names[i].name != NULL; i++) {
@@ -585,7 +585,7 @@ print_event(struct usb_event *event)
char c = ' ';
printf(" device names:");
- for (i = 0; i < MAXDEVNAMES; i++) {
+ for (i = 0; i < USB_MAX_DEVNAMES; i++) {
if (devinfo->devnames[i][0] == '\0')
break;
@@ -662,7 +662,7 @@ match_devname(action_t *action, struct usb_device_info *devinfo)
regmatch_t match;
int error;
- for (i = 0; i < MAXDEVNAMES; i++) {
+ for (i = 0; i < USB_MAX_DEVNAMES; i++) {
if (devinfo->devnames[i][0] == '\0')
break;
@@ -853,9 +853,9 @@ process_event_queue(int fd)
/* handle the event appropriately */
switch (event.ue_type) {
- case USB_EVENT_ATTACH:
- case USB_EVENT_DETACH:
- if (find_action(&event.ue_device, &action_match) == 0)
+ case USB_EVENT_CTRLR_ATTACH:
+ case USB_EVENT_CTRLR_DETACH:
+ if (find_action(&event.u.ue_device, &action_match) == 0)
/* nothing found */
break;
@@ -873,9 +873,9 @@ process_event_queue(int fd)
__progname, action_match.devname, strerror(errno));
}
- if (event.ue_type == USB_EVENT_ATTACH && action_match.action->attach)
+ if (event.ue_type == USB_EVENT_CTRLR_ATTACH && action_match.action->attach)
execute_command(action_match.action->attach);
- if (event.ue_type == USB_EVENT_DETACH && action_match.action->detach)
+ if (event.ue_type == USB_EVENT_CTRLR_DETACH && action_match.action->detach)
execute_command(action_match.action->detach);
break;
OpenPOWER on IntegriCloud