|
|
int cpass();int passc(int c);
The passc function passes a character to a user read request and updates the user structure appropriately.
u.u_count
,
or if there was an error when transferring data from user space.
If an error occurs,
EFAULT is set in u.u_error
.
The passc function returns 0 on success.
Otherwise, -1 is returned
when the user read request has been satisfied,
or if an error occurs when transferring data to user space.
If an error occurs, EFAULT is set in u.u_error
.
u.u_count
, u.u_offset
,
and u.u_base
,
and returns errors in u.u_error
.
If your data could contain a -1, use
copyin(D3oddi)
instead of cpass
because a -1 in the data causes cpass
(through fubyte)
to return -1 and set an error, EFAULT.
passc( )
calls
subyte(D3oddi),
updates u.u_count
, u.u_offset
,
and u.u_base
, and returns errors in u.u_error
.
If your data could contain a -1, use
copyout(D3oddi)
instead of passc
because a -1 in the data causes passc
(through subyte)
to return -1 and set an error, EFAULT.
``Data, copying'' in HDK Technical Reference