diff options
author | 2015-02-10 21:56:08 +0000 | |
---|---|---|
committer | 2015-02-10 21:56:08 +0000 | |
commit | 081bf72016fd7473d333d95c915b1e43ca17cbc2 (patch) | |
tree | b73603c37a30960dcf8c02fec717a11e3621e769 /sys/miscfs | |
parent | In iwm(4), don't reinvent the standard rate set tables. (diff) | |
download | wireguard-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/miscfs')
-rw-r--r-- | sys/miscfs/fuse/fuse_device.c | 8 | ||||
-rw-r--r-- | sys/miscfs/fuse/fuse_vnops.c | 10 |
2 files changed, 9 insertions, 9 deletions
diff --git a/sys/miscfs/fuse/fuse_device.c b/sys/miscfs/fuse/fuse_device.c index 567985f6777..ab67740e80d 100644 --- a/sys/miscfs/fuse/fuse_device.c +++ b/sys/miscfs/fuse/fuse_device.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fuse_device.c,v 1.15 2014/07/12 18:43:52 tedu Exp $ */ +/* $OpenBSD: fuse_device.c,v 1.16 2015/02/10 21:56:10 miod Exp $ */ /* * Copyright (c) 2012-2013 Sylvestre Gallon <ccna.syl@gmail.com> * @@ -429,7 +429,7 @@ fuseread(dev_t dev, struct uio *uio, int ioflag) bzero(&fbuf->fb_next, sizeof(fbuf->fb_next)); tmpaddr = fbuf->fb_dat; fbuf->fb_dat = NULL; - error = uiomove(fbuf, FUSEBUFSIZE, uio); + error = uiomovei(fbuf, FUSEBUFSIZE, uio); if (error) goto end; @@ -469,7 +469,7 @@ fusewrite(dev_t dev, struct uio *uio, int ioflag) if (uio->uio_resid != FUSEBUFSIZE) return (EINVAL); - if ((error = uiomove(&hdr, sizeof(hdr), uio)) != 0) + if ((error = uiomovei(&hdr, sizeof(hdr), uio)) != 0) return (error); /* looking for uuid in fd_fbufs_wait */ @@ -496,7 +496,7 @@ fusewrite(dev_t dev, struct uio *uio, int ioflag) } /* Get the missing datas from the fbuf */ - error = uiomove(&fbuf->FD, uio->uio_resid, uio); + error = uiomovei(&fbuf->FD, uio->uio_resid, uio); if (error) return error; fbuf->fb_dat = NULL; diff --git a/sys/miscfs/fuse/fuse_vnops.c b/sys/miscfs/fuse/fuse_vnops.c index b1b87c7f19f..43db6e28f96 100644 --- a/sys/miscfs/fuse/fuse_vnops.c +++ b/sys/miscfs/fuse/fuse_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fuse_vnops.c,v 1.21 2014/12/16 18:30:04 tedu Exp $ */ +/* $OpenBSD: fuse_vnops.c,v 1.22 2015/02/10 21:56:10 miod Exp $ */ /* * Copyright (c) 2012-2013 Sylvestre Gallon <ccna.syl@gmail.com> * @@ -726,7 +726,7 @@ fusefs_readdir(void *v) break; } - if ((error = uiomove(fbuf->fb_dat, fbuf->fb_len, uio))) { + if ((error = uiomovei(fbuf->fb_dat, fbuf->fb_len, uio))) { fb_delete(fbuf); break; } @@ -805,7 +805,7 @@ fusefs_readlink(void *v) return (error); } - error = uiomove(fbuf->fb_dat, fbuf->fb_len, uio); + error = uiomovei(fbuf->fb_dat, fbuf->fb_len, uio); fb_delete(fbuf); return (error); @@ -1054,7 +1054,7 @@ fusefs_read(void *v) if (error) break; - error = uiomove(fbuf->fb_dat, MIN(size, fbuf->fb_len), uio); + error = uiomovei(fbuf->fb_dat, MIN(size, fbuf->fb_len), uio); if (error) break; @@ -1108,7 +1108,7 @@ fusefs_write(void *v) fbuf->fb_io_off = uio->uio_offset; fbuf->fb_io_len = len; - if ((error = uiomove(fbuf->fb_dat, len, uio))) { + if ((error = uiomovei(fbuf->fb_dat, len, uio))) { printf("fusefs: uio error %i\n", error); break; } |