From 03cfd91998ac017acd3102a184e194d42e50f843 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Fri, 5 Apr 2024 16:31:55 -0600 Subject: [PATCH] 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 --- sbin/devmatch/devmatch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/devmatch/devmatch.c b/sbin/devmatch/devmatch.c index d93a35e5633d..6124794d113a 100644 --- a/sbin/devmatch/devmatch.c +++ b/sbin/devmatch/devmatch.c @@ -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);