aboutsummaryrefslogtreecommitdiff
path: root/sys/sys
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2001-06-11 17:05:52 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2001-06-11 17:05:52 +0000
commitb0def2b54805e62cfd2d4bf71236fdb91d7618b9 (patch)
treecc2047d7b2d1136314711a47d5c6025ee1784d50 /sys/sys
parent21ceb6efa2572847dfcb49302f2d2e2c1fb005a6 (diff)
downloadsrc-b0def2b54805e62cfd2d4bf71236fdb91d7618b9.tar.gz
src-b0def2b54805e62cfd2d4bf71236fdb91d7618b9.zip
Add sbuf_copyin(). Also add 'b' variants of sbuf_{cat,copyin,cpy}() which
ignore NUL bytes in the source string.
Notes
Notes: svn path=/head/; revision=78077
Diffstat (limited to 'sys/sys')
-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 0e0d7d564a95..80d413b1f240 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