Back to Darwin Xnu

Device Set Status

osfmk/man/device_set_status.html

latest1.2 KB
Original Source

device_set_status


Function - Set device status.

SYNOPSIS

**#include&lt device/device.h&gt**** kern\_return\_t device\_set\_status****(mach\_port\_t**device, **dev\_flavor\_t** flavor, **dev\_status\_t** status, **mach\_msg\_type\_number\_t** status\_count**);**

PARAMETERS

device[in device send right] A device port to the device to be manipulated.

flavor[in scalar] The type of status information to set.

status[pointer to in array of natural-sized units] The status information to set.

status_count[in scalar] The size of the status information (in natural-sized units).

DESCRIPTION

The device_set_status function sets device status. The possible values of flavor as well as the corresponding meanings are device dependent.

RETURN VALUES

D_DEVICE_DOWN Device has been shut down

D_IO_ERROR Hardware I/O error

D_NO_SUCH_DEVICE No device with that name, or the device is not operational.

D_OUT_OF_BAND Out-of-band condition occurred on device (such as typing &ltCtrl&gt-C ).

D_READ_ONLY Data cannot be written to this device.

Functions: device_get_status.