From c90902d39e7af742581ae1c3de910f11fb3588d2 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Tue, 22 Jun 2021 22:10:31 -0600 Subject: [PATCH] bus_child_pnpinfo: fix two stragglers ddfc9c4c59e2 was missing changes to two files to complete the bus_child_pnpinfo_str->bus_child_pnpinfo. This fixes the broken kernel builds. Sponsored by: Netflix --- sys/dev/ofw/ofw_bus_subr.c | 11 ++++------- sys/powerpc/ofw/ofw_pcibus.c | 1 + 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/sys/dev/ofw/ofw_bus_subr.c b/sys/dev/ofw/ofw_bus_subr.c index 5ce8d7b7bd48..12fbafe4077f 100644 --- a/sys/dev/ofw/ofw_bus_subr.c +++ b/sys/dev/ofw/ofw_bus_subr.c @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -86,22 +87,18 @@ ofw_bus_gen_destroy_devinfo(struct ofw_bus_devinfo *obd) } int -ofw_bus_gen_child_pnpinfo_str(device_t cbdev, device_t child, char *buf, - size_t buflen) +ofw_bus_gen_child_pnpinfo(device_t cbdev, device_t child, struct sbuf *sb) { - *buf = '\0'; if (!ofw_bus_status_okay(child)) return (0); if (ofw_bus_get_name(child) != NULL) { - strlcat(buf, "name=", buflen); - strlcat(buf, ofw_bus_get_name(child), buflen); + sbuf_printf(sb, "name=%s ", ofw_bus_get_name(child)); } if (ofw_bus_get_compat(child) != NULL) { - strlcat(buf, " compat=", buflen); - strlcat(buf, ofw_bus_get_compat(child), buflen); + sbuf_printf(sb, "compat=%s ", ofw_bus_get_compat(child)); } return (0); diff --git a/sys/powerpc/ofw/ofw_pcibus.c b/sys/powerpc/ofw/ofw_pcibus.c index 21ce8b04e88a..2c0a78812cc6 100644 --- a/sys/powerpc/ofw/ofw_pcibus.c +++ b/sys/powerpc/ofw/ofw_pcibus.c @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include