FUBYTE(K) UNIX System V FUBYTE(K)
Name
fubyte - gets a character from user data space
Syntax
int
fubyte(src)
unsigned char *src;
Description
The fubyte routine retrieves (fetches) one character from
the user's data space. If you are fetching data from
u.u_base, consider using cpass(K) in that u.u_count,
u.u_offset, and u.u_base are updated for you, and error
handling is provided via u.u_error. If any chance exists
that a -1 may be contained in the data that you are
receiving from user space, use copyin(K) instead of fubyte
(or cpass). A -1 in the data is usually associated as an
error condition.
This routine must not be called from an interrupt or xxinit
routine.
Parameters
The argument src points to the address from which the byte
is to be copied.
Return Value
The value of the retrieved byte is returned. If -1 is
received, then an error occurred and u.u_error should be set
to EFAULT.
See Also
fuword(K), cpass(K)
(printed 7/6/89)