From 64889277bc3c36dde9f8168642b85f37b5cd8f46 Mon Sep 17 00:00:00 2001 From: Glauber Costa <glommer@cloudius-systems.com> Date: Mon, 3 Mar 2014 16:51:30 +0400 Subject: [PATCH] uio: super structure around uio I am using the same name as solaris code expect. The first field is an uio, and the rest is something that we will use in specialized functions. Signed-off-by: Glauber Costa <glommer@cloudius-systems.com> --- include/osv/uio.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/osv/uio.h b/include/osv/uio.h index b57b81e51..bd9ff17b0 100644 --- a/include/osv/uio.h +++ b/include/osv/uio.h @@ -60,6 +60,16 @@ struct uio { enum uio_rw uio_rw; /* operation */ }; +// This layout support only one buffer per uio, which means that it will +// only work for a iovcnt of 1. We can extend later if needed, but because we +// are reading it page by page, it should be fine for now. +struct uio_mapper { + struct uio uio; + size_t buf_size; + size_t buf_off; + void *buffer; +}; + int copyinuio(struct iovec *iovp, u_int iovcnt, struct uio **uiop); int uiomove(void *cp, int n, struct uio *uio); -- GitLab