Changeset View
Changeset View
Standalone View
Standalone View
sys/contrib/openzfs/include/os/freebsd/spl/sys/uio.h
Show All 23 Lines | |||||
* SUCH DAMAGE. | * SUCH DAMAGE. | ||||
* | * | ||||
* $FreeBSD$ | * $FreeBSD$ | ||||
*/ | */ | ||||
#ifndef _OPENSOLARIS_SYS_UIO_H_ | #ifndef _OPENSOLARIS_SYS_UIO_H_ | ||||
#define _OPENSOLARIS_SYS_UIO_H_ | #define _OPENSOLARIS_SYS_UIO_H_ | ||||
#ifndef _STANDALONE | |||||
#include_next <sys/uio.h> | #include_next <sys/uio.h> | ||||
#include <sys/_uio.h> | #include <sys/_uio.h> | ||||
#include <sys/debug.h> | #include <sys/debug.h> | ||||
#define uio_loffset uio_offset | #define uio_loffset uio_offset | ||||
▲ Show 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | uio_index_at_offset(uio_t *uio, offset_t off, uint_t *vec_idx) | ||||
*vec_idx = 0; | *vec_idx = 0; | ||||
while (*vec_idx < uio_iovcnt(uio) && off >= uio_iovlen(uio, *vec_idx)) { | while (*vec_idx < uio_iovcnt(uio) && off >= uio_iovlen(uio, *vec_idx)) { | ||||
off -= uio_iovlen(uio, *vec_idx); | off -= uio_iovlen(uio, *vec_idx); | ||||
(*vec_idx)++; | (*vec_idx)++; | ||||
} | } | ||||
return (off); | return (off); | ||||
} | } | ||||
#endif /* !_STANDALONE */ | |||||
#endif /* !_OPENSOLARIS_SYS_UIO_H_ */ | #endif /* !_OPENSOLARIS_SYS_UIO_H_ */ |