diff options
author | des <des@FreeBSD.org> | 2001-06-11 17:05:52 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2001-06-11 17:05:52 +0000 |
commit | 86b7e548abe9b6b107b4747111ff5469096d79ce (patch) | |
tree | cc2047d7b2d1136314711a47d5c6025ee1784d50 /sys/sys/sbuf.h | |
parent | cd17b047230e791591e0941d1c8b6c3f59fa12eb (diff) | |
download | FreeBSD-src-86b7e548abe9b6b107b4747111ff5469096d79ce.zip FreeBSD-src-86b7e548abe9b6b107b4747111ff5469096d79ce.tar.gz |
Add sbuf_copyin(). Also add 'b' variants of sbuf_{cat,copyin,cpy}() which
ignore NUL bytes in the source string.
Diffstat (limited to 'sys/sys/sbuf.h')
-rw-r--r-- | sys/sys/sbuf.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/sys/sbuf.h b/sys/sys/sbuf.h index 0e0d7d5..80d413b 100644 --- a/sys/sys/sbuf.h +++ b/sys/sys/sbuf.h @@ -54,6 +54,8 @@ __BEGIN_DECLS struct sbuf *sbuf_new(struct sbuf *s, char *buf, int length, int flags); void sbuf_clear(struct sbuf *s); int sbuf_setpos(struct sbuf *s, int pos); +int sbuf_bcat(struct sbuf *s, const char *str, size_t len); +int sbuf_bcpy(struct sbuf *s, const char *str, size_t len); int sbuf_cat(struct sbuf *s, const char *str); int sbuf_cpy(struct sbuf *s, const char *str); int sbuf_printf(struct sbuf *s, char *fmt, ...); @@ -63,6 +65,11 @@ void sbuf_finish(struct sbuf *s); char *sbuf_data(struct sbuf *s); int sbuf_len(struct sbuf *s); void sbuf_delete(struct sbuf *s); + +#ifdef _KERNEL +int sbuf_bcopyin(struct sbuf *s, const void *uaddr, size_t len); +int sbuf_copyin(struct sbuf *s, const void *uaddr, size_t len); +#endif __END_DECLS #endif |