prusrio.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/sysmacros.h>
#if defined(__sparc)
#endif
int
{
/* longlong-aligned short buffer */
int error = 0;
void *bp;
int allocated;
allocated = 0;
} else {
allocated = 1;
}
#if defined(__sparc)
if (p == curproc)
(void) flush_user_windows_to_stack(NULL);
#endif
switch (rw) {
case UIO_READ:
break;
}
/*
* ENXIO indicates that a page didn't exist. If the I/O was
* truncated, return success; otherwise convert the error into
* EIO. When obeying new /proc semantics, we don't return an
* error for a read that begins at an invalid address.
*/
error = 0;
else
}
break;
case UIO_WRITE:
break;
break;
}
}
/*
* ENXIO indicates that a page didn't exist. If the I/O was
* truncated, return success; otherwise convert the error
* into EIO.
*/
error = 0;
else
}
break;
default:
/*NOTREACHED*/
}
if (allocated)
return (error);
}