Document sbuf_new_for_sysctl(9).
Pointed out by: lstewart
This commit is contained in:
@@ -1031,6 +1031,7 @@ MLINKS+=sbuf.9 sbuf_bcat.9 \
|
||||
sbuf.9 sbuf_finish.9 \
|
||||
sbuf.9 sbuf_len.9 \
|
||||
sbuf.9 sbuf_new.9 \
|
||||
sbuf.9 sbuf_new_for_sysctl.9 \
|
||||
sbuf.9 sbuf_printf.9 \
|
||||
sbuf.9 sbuf_putc.9 \
|
||||
sbuf.9 sbuf_set_drain.9 \
|
||||
|
||||
+14
-1
@@ -25,13 +25,14 @@
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd May 17, 2009
|
||||
.Dd January 25, 2011
|
||||
.Dt SBUF 9
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm sbuf ,
|
||||
.Nm sbuf_new ,
|
||||
.Nm sbuf_new_auto ,
|
||||
.Nm sbuf_new_for_sysctl ,
|
||||
.Nm sbuf_clear ,
|
||||
.Nm sbuf_setpos ,
|
||||
.Nm sbuf_bcat ,
|
||||
@@ -99,6 +100,9 @@
|
||||
.Fn sbuf_done "struct sbuf *s"
|
||||
.Ft void
|
||||
.Fn sbuf_delete "struct sbuf *s"
|
||||
.In sys/sysctl.h
|
||||
.Ft struct sbuf *
|
||||
.Fn sbuf_new_for_sysctl "struct sbuf *s" "char *buf" "int length" "struct sysctl_req *req"
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Nm
|
||||
@@ -169,6 +173,15 @@ and
|
||||
.Dv SBUF_AUTOEXTEND .
|
||||
.Pp
|
||||
The
|
||||
.Fn sbuf_new_for_sysctl
|
||||
function will set up an sbuf with a drain function to use
|
||||
.Fn SYSCTL_OUT
|
||||
when the internal buffer fills.
|
||||
The sysctl old buffer will be wired, which allows for doing an
|
||||
.Fn sbuf_printf
|
||||
while holding a mutex.
|
||||
.Pp
|
||||
The
|
||||
.Fn sbuf_delete
|
||||
function clears the
|
||||
.Fa sbuf
|
||||
|
||||
Reference in New Issue
Block a user