SVR5
drv_close(D3)
drv_close --
obtain a channel handle for subsequent access by layered driver
Synopsis
#include <sys/types.h>
#include <sys/ddi.h>
int drv_close(chan_handle handle, int oflags,
cred_t *crp);
Description
drv_close( )
closes a channel handle that was obtained
with a previous call to the
drv_open(D3)
function.
Arguments
chan_handle_p-
The channel handle that was returned
by the corresponding
drv_open(D3)
call.
oflags-
Flags to pass to the
open( )
entry point routine.
See the
open(D2)
manual page for a list of valid values.
crp-
Pointer to the user credential structure.
This value is passed to the
close(D2)
entry point routine.
Return values
The
drv_open( )
function returns 0 for success, or the
appropriate non-zero error number from
errnos(D5).
Return errors rarely occur,
but if they do,
they indicate an error on the underlying driver.
The device and the channel are still closed.
Usage
Each
drv_open( )
call must be matched by a corresponding
drv_close(D3)
call, although the target driver only receives
one
close(D2)
call per channel,
called when the last outstanding
drv_open( )
call has been ended with a call to
drv_close( ).
Context and synchronization
User or blockable
context.
Hardware applicability
All
Version applicability
ddi:
8, 8mp
References
do_biostart(D3),
do_devinfo(D3),
do_ioctl(D3),
drv_attach(D3),
drv_open(D3)
``Layered device drivers'' in HDK Technical Reference
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005