summaryrefslogtreecommitdiffstats
path: root/sys/net/if_tun.c
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2015-02-10 21:56:08 +0000
committermiod <miod@openbsd.org>2015-02-10 21:56:08 +0000
commit081bf72016fd7473d333d95c915b1e43ca17cbc2 (patch)
treeb73603c37a30960dcf8c02fec717a11e3621e769 /sys/net/if_tun.c
parentIn iwm(4), don't reinvent the standard rate set tables. (diff)
downloadwireguard-openbsd-081bf72016fd7473d333d95c915b1e43ca17cbc2.tar.xz
wireguard-openbsd-081bf72016fd7473d333d95c915b1e43ca17cbc2.zip
First step towards making uiomove() take a size_t size argument:
- rename uiomove() to uiomovei() and update all its users. - introduce uiomove(), which is similar to uiomovei() but with a size_t. - rewrite uiomovei() as an uiomove() wrapper. ok kettenis@
Diffstat (limited to 'sys/net/if_tun.c')
-rw-r--r--sys/net/if_tun.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c
index 045e282e7cf..7700b6edc49 100644
--- a/sys/net/if_tun.c
+++ b/sys/net/if_tun.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_tun.c,v 1.131 2015/01/21 02:23:14 guenther Exp $ */
+/* $OpenBSD: if_tun.c,v 1.132 2015/02/10 21:56:10 miod Exp $ */
/* $NetBSD: if_tun.c,v 1.24 1996/05/07 02:40:48 thorpej Exp $ */
/*
@@ -758,7 +758,7 @@ tunread(dev_t dev, struct uio *uio, int ioflag)
while (m0 != NULL && uio->uio_resid > 0 && error == 0) {
len = min(uio->uio_resid, m0->m_len);
if (len != 0)
- error = uiomove(mtod(m0, caddr_t), len, uio);
+ error = uiomovei(mtod(m0, caddr_t), len, uio);
MFREE(m0, m);
m0 = m;
}
@@ -826,7 +826,7 @@ tunwrite(dev_t dev, struct uio *uio, int ioflag)
}
while (error == 0 && uio->uio_resid > 0) {
m->m_len = min(mlen, uio->uio_resid);
- error = uiomove(mtod (m, caddr_t), m->m_len, uio);
+ error = uiomovei(mtod (m, caddr_t), m->m_len, uio);
*mp = m;
mp = &m->m_next;
if (error == 0 && uio->uio_resid > 0) {