]> git.proxmox.com Git - mirror_spl.git/blame - include/sys/uio.h
Add 3 missing typedefs.
[mirror_spl.git] / include / sys / uio.h
CommitLineData
6adf99e7 1#ifndef _SPL_UIO_H
2#define _SPL_UIO_H
3
73e540a0 4#include <linux/uio.h>
5#include <asm/uaccess.h>
6#include <sys/types.h>
7
4b171585 8typedef enum uio_rw {
9 UIO_READ = 0,
10 UIO_WRITE = 1,
11} uio_rw_t;
6adf99e7 12
73e540a0 13typedef enum uio_seg {
14 UIO_USERSPACE = 0,
15 UIO_SYSSPACE = 1,
16 UIO_USERISPACE =2,
17} uio_seg_t;
18
19typedef struct uio {
20 struct iovec *uio_iov; /* pointer to array of iovecs */
21 int uio_iovcnt; /* number of iovecs */
22 offset_t uio_loffset; /* file offset */
23 uio_seg_t uio_segflg; /* address space (kernel or user) */
24 uint16_t uio_fmode; /* file mode flags */
25 uint16_t uio_extflg; /* extended flags */
26 offset_t uio_limit; /* u-limit (maximum byte offset) */
27 ssize_t uio_resid; /* residual count */
28} uio_t;
29
30typedef struct aio_req {
31 uio_t *aio_uio; /* UIO for this request */
32 void *aio_private;
33} aio_req_t;
34
35/* XXX: Must be fully implemented when ZVOL is needed, for reference:
36 * http://cvs.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/os/move.c
37 */
38#if 0
39static __inline__ int
40uiomove(void *p, size_t n, enum uio_rw rw, struct uio *uio)
41{
42 return 0;
43}
44#endif
6adf99e7 45
46#endif /* SPL_UIO_H */