Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Aug 2020 11:46:50 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r364953 - head/sys/kern
Message-ID:  <202008291146.07TBkoD6080084@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Sat Aug 29 11:46:50 2020
New Revision: 364953
URL: https://svnweb.freebsd.org/changeset/base/364953

Log:
  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.

Modified:
  head/sys/kern/subr_bus.c

Modified: head/sys/kern/subr_bus.c
==============================================================================
--- head/sys/kern/subr_bus.c	Sat Aug 29 11:39:53 2020	(r364952)
+++ head/sys/kern/subr_bus.c	Sat Aug 29 11:46:50 2020	(r364953)
@@ -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 : "");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202008291146.07TBkoD6080084>