devmatch: Make -a work for all devices

devmatch -a should produce output for all attached devices, but doesn't.

Noticed by:		cperciva
Sponsored by:		Netflix
This commit is contained in:
Warner Losh 2024-04-05 16:31:55 -06:00
parent cfcf475a66
commit 03cfd91998

View file

@ -406,7 +406,7 @@ search_hints(const char *bus, const char *dev, const char *pnpinfo)
else if (!notme) {
if (!unbound_flag) {
if (all_flag)
printf("%s: %s", *dev ? dev : "unattached", lastmod);
printf("%s: %s\n", *dev ? dev : "unattached", lastmod);
else
printf("%s\n", lastmod);
if (verbose_flag)
@ -445,7 +445,7 @@ find_unmatched(struct devinfo_dev *dev, void *arg)
break;
if (!(dev->dd_flags & DF_ENABLED))
break;
if (dev->dd_flags & DF_ATTACHED_ONCE)
if (!all_flag && dev->dd_flags & DF_ATTACHED_ONCE)
break;
parent = devinfo_handle_to_device(dev->dd_parent);
bus = strdup(parent->dd_name);