summaryrefslogtreecommitdiff
path: root/include/linux/uio.h
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2017-02-18 01:44:03 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2017-10-11 22:36:54 -0400
commit09cf698a594276139b7dfafb232af3fe4fbc4438 (patch)
tree163c2dbfca800af81aed88f993e6db004093c35b /include/linux/uio.h
parent6d1ff4d6f37dc3c14d9fc08dbbbb920a12c21f84 (diff)
new primitive: iov_iter_for_each_range()
For kvec and bvec: feeds segments to given callback as long as it returns 0. For iovec and pipe: fails. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/uio.h')
-rw-r--r--include/linux/uio.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/uio.h b/include/linux/uio.h
index 5885daeae721..e67e12adb136 100644
--- a/include/linux/uio.h
+++ b/include/linux/uio.h
@@ -244,4 +244,8 @@ int compat_import_iovec(int type, const struct compat_iovec __user * uvector,
int import_single_range(int type, void __user *buf, size_t len,
struct iovec *iov, struct iov_iter *i);
+int iov_iter_for_each_range(struct iov_iter *i, size_t bytes,
+ int (*f)(struct kvec *vec, void *context),
+ void *context);
+
#endif