Go to the first, previous, next, last section, table of contents.
device_open
opens the device name and returns
a port to it in device. The open count for the device is
incremented by one. If the open count was 0, the open handler for the
device is invoked.
master_port must hold the master device port. name specifies the device to open, and is a string up to 128 characters long. mode is the open mode. It is a bitwise-or of the following constants:
D_READ
D_WRITE
D_NODELAY
The function returns D_SUCCESS
if the device was successfully
opened, D_INVALID_OPERATION
if master_port is not the
master device port, D_WOULD_BLOCK
is the device is busy and
D_NOWAIT
was specified in mode, D_ALREADY_OPEN
if the
device is already open in an incompatible mode and
D_NO_SUCH_DEVICE
if name does not denote a know device.
device_open
function.
device_open_request
performs the open request. The meaning for
the parameters is as in device_open
. Additionally, the caller
has to supply a reply port to which the ds_device_open_reply
message is sent by the kernel when the open has been performed. The
return value of the open operation is stored in return_code.
As neither function receives a reply message, only message transmission
errors apply. If no error occurs, KERN_SUCCESS
is returned.
Go to the first, previous, next, last section, table of contents.