Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ uiomove(9F) — SunOS 5.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ureadc(9F)

uwritec(9F)

uio(9S)

iovec(9S)

uiomove(9F)

NAME

uiomove − copy kernel data using uio(9S) structure

SYNOPSIS

#include <sys/types.h>
#include <sys/uio.h>
int uiomove(caddr_t address, long nbytes, enum uio_rw rwflag
, struct uio ∗ uio_p);

ARGUMENTS

address
Source/destination kernel address of the copy.

nbytes Number of bytes to copy. 

rwflag Flag indicating read or write operation.  Possible values are UIO_READ and UIO_WRITE. 

uio_p Pointer to the uio structure for the copy. 

INTERFACE LEVEL

Architecture independent level 1 (DDI/DKI). 

DESCRIPTION

The uiomove() function copies nbytes of data to or from the space defined by the uio structure (described in uio.h) and the driver. 

The uio_segflg member of the uio(9S) structure determines the the type of space to or from which the transfer being made.  If it is set to UIO_SYSSPACE the data transfer is between addresses in the kernel.  If it is set to UIO_USERSPACE the transfer is between a user program and kernel space. 

In addition to moving the data, uiomove() adds the number of bytes moved to the iov_base member of the iovec(9S) structure, decreases the iov_len member, increases the uio_offset member of the uio(9S) structure, and decreases the uio_resid member. 

This function does automatic page boundary checking.  nbytes does not have to be word-aligned. 

RETURN VALUES

uiomove() returns 0 upon success or EFAULT on failure. 

CONTEXT

uiomove() can be called from user or interrupt context. 

SEE ALSO

ureadc(9F), uwritec(9F), uio(9S), iovec(9S). 

SunOS 5.1 Writing Device Drivers

WARNINGS

If uio_segflg is set to UIO_SYSSPACE and address is selected from user space, the system may panic. 

SunOS 5.1  —  Last change: 29 Sep 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026