device_writewrites data_count bytes from the buffer data to device. The number of bytes actually written is returned in bytes_written.
If mode is
D_NOWAIT, the function returns without waiting for I/O completion. Otherwise mode should be 0. recnum is the record number to be written, its meaning is device specific.
The function returns
D_SUCCESSif some data was successfully written and
D_NO_SUCH_DEVICEif device does not denote a device port or the device is dead or not completely open.
device_write_inbandfunction works as the
device_writefunction, except that the data is sent “in-line” in the request IPC message (see Memory).
This is the asynchronous form of the
device_write_requestperforms the write request. The meaning for the parameters is as in
device_write. Additionally, the caller has to supply a reply port to which the
ds_device_write_replymessage is sent by the kernel when the write has been performed. The return value of the write operation is stored in return_code.
As neither function receives a reply message, only message transmission errors apply. If no error occurs,
ds_device_write_reply_inbandfunctions work as the
ds_device_write_replyfunctions, except that the data is sent “in-line” in the request IPC message (see Memory).