summaryrefslogtreecommitdiffstats
path: root/sys/sys/sbuf.h
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2001-06-11 17:05:52 +0000
committerdes <des@FreeBSD.org>2001-06-11 17:05:52 +0000
commit86b7e548abe9b6b107b4747111ff5469096d79ce (patch)
treecc2047d7b2d1136314711a47d5c6025ee1784d50 /sys/sys/sbuf.h
parentcd17b047230e791591e0941d1c8b6c3f59fa12eb (diff)
downloadFreeBSD-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.h7
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
OpenPOWER on IntegriCloud