aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/usbd
diff options
context:
space:
mode:
authorNick Hibma <n_hibma@FreeBSD.org>2000-05-12 23:42:06 +0000
committerNick Hibma <n_hibma@FreeBSD.org>2000-05-12 23:42:06 +0000
commit583b504e4380b454273cda041ec377dd3c681b3f (patch)
tree0c6a24ba3a10e720b01912c05fae636c08628cdd /usr.sbin/usbd
parent99e988f2036c4d8ada5c4ee5f7ab3a69df6dbbf3 (diff)
Notes
Diffstat (limited to 'usr.sbin/usbd')
-rw-r--r--usr.sbin/usbd/usbd.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/usbd/usbd.c b/usr.sbin/usbd/usbd.c
index b866eca63ed6..06e7637bf853 100644
--- a/usr.sbin/usbd/usbd.c
+++ b/usr.sbin/usbd/usbd.c
@@ -702,7 +702,12 @@ find_action(struct usb_device_info *devinfo, action_match_t *action_match)
(action->devname == WILDCARD_STRING ||
(match = match_devname(action, devinfo)) != -1)) {
/* found match !*/
- if (match != -1)
+
+ /* Find a devname for pretty printing. Either
+ * the matched one or otherwise, if there is only
+ * 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')