From f6c941f34784461905f2fa91bf962d77ba377d22 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Sat, 29 Aug 2020 11:46:50 +0000 Subject: [PATCH] We don't need to INCLUDENUL, so turn it off to avoid assertion... sbuf_new_for_sysctl turns on INCLUDENUL, but we don't need it. And we assert for it in the new bus_pnpinfo_sb and bus_location_sb strings. --- sys/kern/subr_bus.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index d333c304a75a..b373bc38e131 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -265,6 +265,7 @@ device_sysctl_handler(SYSCTL_HANDLER_ARGS) int error; sbuf_new_for_sysctl(&sb, NULL, 1024, req); + sbuf_clear_flags(&sb, SBUF_INCLUDENUL); switch (arg2) { case DEVICE_SYSCTL_DESC: sbuf_cat(&sb, dev->desc ? dev->desc : "");