Make sbuf_copyin() return the number of bytes copied on success.
Submitted by: "Wojciech A. Koszek" <dunstan@freebsd.czest.pl>
This commit is contained in:
parent
d2a401cb70
commit
49091c48d5
@ -337,6 +337,10 @@ and
|
||||
return
|
||||
.Dv NULL
|
||||
and \-1, respectively, if the buffer overflowed.
|
||||
.Pp
|
||||
.Fn sbuf_copyin
|
||||
returns \-1 if copying string from userland failed, and number of bytes
|
||||
copied otherwise.
|
||||
.Sh SEE ALSO
|
||||
.Xr printf 3 ,
|
||||
.Xr strcat 3 ,
|
||||
|
@ -379,7 +379,7 @@ sbuf_copyin(struct sbuf *s, const void *uaddr, size_t len)
|
||||
return (-1); /* XXX */
|
||||
}
|
||||
|
||||
return (0);
|
||||
return (done);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user