aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2021-06-23 04:10:31 +0000
committerWarner Losh <imp@FreeBSD.org>2021-06-23 04:10:31 +0000
commitc90902d39e7af742581ae1c3de910f11fb3588d2 (patch)
tree6691e3b7ee41e6f5e3ca2669062eb2d212fbbf9e
parentddfc9c4c59e2ea4871100d8c076adffe3af8ff21 (diff)
downloadsrc-c90902d39e7af742581ae1c3de910f11fb3588d2.tar.gz
src-c90902d39e7af742581ae1c3de910f11fb3588d2.zip
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
-rw-r--r--sys/dev/ofw/ofw_bus_subr.c11
-rw-r--r--sys/powerpc/ofw/ofw_pcibus.c1
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 <sys/bus.h>
#include <sys/errno.h>
#include <sys/libkern.h>
+#include <sys/sbuf.h>
#include <machine/resource.h>
@@ -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 <sys/libkern.h>
#include <sys/module.h>
#include <sys/pciio.h>
+#include <sys/sbuf.h>
#include <sys/smp.h>
#include <dev/ofw/ofw_bus.h>