FreeBSD/sys/dev/twe/twe_freebsd.c
/********************************************************************************
 * Handle open from generic layer.
 *
 * Note that this is typically only called by the diskslice code, and not
 * for opens on subdevices (eg. slices, partitions).
 */
Handle open from generic layer.
Note that this is typically only called by the diskslice code, and not
for opens on subdevices .
Handle open from generic layer . Note that this is typically only called by the diskslice code and not for opens on subdevices .
static int
twed_open(struct disk *dp)
{
    struct twed_softc	*sc = (struct twed_softc *)dp->d_drv1;
    debug_called(4);
    if (sc == NULL)
	return (ENXIO);
    if (sc->twed_controller->twe_state & TWE_STATE_SHUTDOWN)
	return(ENXIO);
    return (0);
}
static int twed_open ( struct disk * dp ) { struct twed_softc * sc = ( struct twed_softc * ) dp -> d_drv1 ; debug_called ( 4 ) ; if ( sc == NULL ) return ( ENXIO ) ; if ( sc -> twed_controller -> twe_state & TWE_STATE_SHUTDOWN ) return ( ENXIO ) ; return ( 0 ) ; }
Handle open from generic layer.
Handle open from generic layer .
/* check that the controller is up and running */