Make sbuf_setpos match the implementation.

sbuf_setpos can only be used to truncate the buffer, never to make it
longer. Update the documentation to reflect this.

Reviewed By: allanjude, phk
Differential Revision: https://reviews.freebsd.org/D26198
This commit is contained in:
Warner Losh 2020-08-26 17:06:16 +00:00
parent 3971092e11
commit 513575d446
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=364824

View File

@ -25,7 +25,7 @@
.\" .\"
.\" $FreeBSD$ .\" $FreeBSD$
.\" .\"
.Dd August 7, 2019 .Dd August 26, 2020
.Dt SBUF 9 .Dt SBUF 9
.Os .Os
.Sh NAME .Sh NAME
@ -370,9 +370,8 @@ function sets the
.Fa sbuf Ns 's .Fa sbuf Ns 's
end position to end position to
.Fa pos , .Fa pos ,
which is a value between zero and one less than the size of the which is a value between zero and the current position in the buffer.
storage buffer. It can only truncate the sbuf to the new position.
This effectively truncates the sbuf at the new position.
.Pp .Pp
The The
.Fn sbuf_bcat .Fn sbuf_bcat