Next: , Previous: Device Map, Up: Device Interface


10.7 Device Status

— Function: kern_return_t device_set_status (device_t device, dev_flavor_t flavor, dev_status_t status, mach_msg_type_number_t status_count)

The function device_set_status sets the status of a device. The possible values for flavor and their interpretation is device specific.

The function returns D_SUCCESS if some data was successfully written and D_NO_SUCH_DEVICE if device does not denote a device port or the device is dead or not completely open.

— Function: kern_return_t device_get_status (device_t device, dev_flavor_t flavor, dev_status_t status, mach_msg_type_number_t *status_count)

The function device_get_status gets the status of a device. The possible values for flavor and their interpretation is device specific.

The function returns D_SUCCESS if some data was successfully written and D_NO_SUCH_DEVICE if device does not denote a device port or the device is dead or not completely open.