/*
* This file and its contents are supplied under the terms of the
* Common Development and Distribution License ("CDDL"), version 1.0.
* You may only use this file in accordance with the terms of version
* 1.0 of the CDDL.
*
* A full copy of the text of the CDDL should have accompanied this
* source. A copy of the CDDL is also available via the Internet at
*/
/*
* Copyright 2015 Nexenta Systems, Inc. All rights reserved.
*/
#include <sys/sysmacros.h>
/*
* Move "n" bytes at byte address "p"; "rw" indicates the direction
* of the move, and the I/O parameters are provided in "uio", which is
* update to reflect the data which was moved. Returns 0 on success or
* a non-zero errno on failure.
*/
int
{
if (cnt == 0L) {
uio->uio_iovcnt--;
continue;
}
switch (uio->uio_segflg) {
case UIO_USERSPACE:
case UIO_USERISPACE:
return (EINVAL);
case UIO_SYSSPACE:
else
break;
}
n -= cnt;
}
return (0);
}
/*
* Drop the next n chars out of *uiop.
*/
void
{
return;
while (n != 0) {
if (niovb == 0) {
uiop->uio_iovcnt--;
continue;
}
n -= niovb;
}
}