diff options
Diffstat (limited to 'sys/kern/kern_subr.c')
-rw-r--r-- | sys/kern/kern_subr.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sys/kern/kern_subr.c b/sys/kern/kern_subr.c index 3c4e44f2b14..71ec338632c 100644 --- a/sys/kern/kern_subr.c +++ b/sys/kern/kern_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_subr.c,v 1.42 2014/12/10 15:29:53 mikeb Exp $ */ +/* $OpenBSD: kern_subr.c,v 1.43 2015/02/10 21:56:09 miod Exp $ */ /* $NetBSD: kern_subr.c,v 1.15 1996/04/09 17:21:56 ragge Exp $ */ /* @@ -47,7 +47,7 @@ #include <sys/resourcevar.h> int -uiomove(void *cp, int n, struct uio *uio) +uiomove(void *cp, size_t n, struct uio *uio) { struct iovec *iov; size_t cnt; @@ -104,6 +104,15 @@ uiomove(void *cp, int n, struct uio *uio) return (error); } +int +uiomovei(void *cp, int n, struct uio *uio) +{ + if (n < 0) + return 0; + + return uiomove(cp, (size_t)n, uio); +} + /* * Give next character to user as result of read. */ |