Skip to content
Snippets Groups Projects
Commit 64889277 authored by Glauber Costa's avatar Glauber Costa
Browse files

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: default avatarGlauber Costa <glommer@cloudius-systems.com>
parent b271236c
No related branches found
No related tags found
No related merge requests found
...@@ -60,6 +60,16 @@ struct uio { ...@@ -60,6 +60,16 @@ struct uio {
enum uio_rw uio_rw; /* operation */ 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 copyinuio(struct iovec *iovp, u_int iovcnt, struct uio **uiop);
int uiomove(void *cp, int n, struct uio *uio); int uiomove(void *cp, int n, struct uio *uio);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment