MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Kernel Functions for Drivers                         ldiread(9F)



NAME
     ldiread, ldiwrite - Read and write from a device

SYNOPSIS
     #include 

     int ldiread(ldihandlet lh, struct uio *uiop, credt *cr);


     int  ldiwrite(ldihandlet lh, struct uio *uiop, credt *cr);


PARAMETERS
     lh       Layered handle.


     cr       Pointer to a credential structure used  to  open  a
              device.


     uiop     Pointer to the uio(9S) structure. uio(9S) specifies
              the  location  of  the read or write data.  (Either
              userland or kernel.)


DESCRIPTION
     The ldiread() function passes a read request to the  device
     entry  point for the device specified by the layered handle.
     This operation is supported   for   block,   character,  and
     streams devices.


     The ldiwrite() function passes a write request to the  dev-
     ice  entry  point for a device specified by the layered han-
     dle. This operation is supported for block,  character,  and
     streams devices.

RETURN VALUES
     The ldiread() and ldiwrite() functions return 0 upon  suc-
     cess.  If  a  failure occurs before the request is passed to
     the device, the possible return values are shown below. Oth-
     erwise any other error number may be returned by the device.

     EINVAL     Invalid input parameters.


     ENOTSUP    Operation is not supported for this device.


CONTEXT
     These functions may be called from user or kernel context.




SunOS 5.11          Last change: 3 June 2003                    1



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™