Use explicit int values for the device states in order to allow,
if necessary, in the future, adds of new states without breaking ABI between revisions. Proposed by: kib Approved by: imp
This commit is contained in:
parent
435068aab7
commit
9a3ca99927
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=197224
@ -41,10 +41,10 @@ typedef __uintptr_t devinfo_handle_t;
|
|||||||
*/
|
*/
|
||||||
/* XXX not sure if I want a copy here, or expose sys/bus.h */
|
/* XXX not sure if I want a copy here, or expose sys/bus.h */
|
||||||
typedef enum devinfo_state {
|
typedef enum devinfo_state {
|
||||||
DIS_NOTPRESENT, /* not probed or probe failed */
|
DIS_NOTPRESENT = 10, /* not probed or probe failed */
|
||||||
DIS_ALIVE, /* probe succeeded */
|
DIS_ALIVE = 20, /* probe succeeded */
|
||||||
DIS_ATTACHED, /* attach method called */
|
DIS_ATTACHED = 30, /* attach method called */
|
||||||
DIS_BUSY /* device is open */
|
DIS_BUSY = 40 /* device is open */
|
||||||
} devinfo_state_t;
|
} devinfo_state_t;
|
||||||
|
|
||||||
struct devinfo_dev {
|
struct devinfo_dev {
|
||||||
|
@ -50,10 +50,10 @@ struct u_businfo {
|
|||||||
* @brief State of the device.
|
* @brief State of the device.
|
||||||
*/
|
*/
|
||||||
typedef enum device_state {
|
typedef enum device_state {
|
||||||
DS_NOTPRESENT, /**< @brief not probed or probe failed */
|
DS_NOTPRESENT = 10, /**< @brief not probed or probe failed */
|
||||||
DS_ALIVE, /**< @brief probe succeeded */
|
DS_ALIVE = 20, /**< @brief probe succeeded */
|
||||||
DS_ATTACHED, /**< @brief attach method called */
|
DS_ATTACHED = 30, /**< @brief attach method called */
|
||||||
DS_BUSY /**< @brief device is open */
|
DS_BUSY = 40 /**< @brief device is open */
|
||||||
} device_state_t;
|
} device_state_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user