summaryrefslogtreecommitdiffstats
path: root/lib/libdevinfo/devinfo.h
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2002-09-20 02:16:33 +0000
committerimp <imp@FreeBSD.org>2002-09-20 02:16:33 +0000
commita4260bf8f13b36400c592d22d847e493853de5eb (patch)
treebbf4b3adcfce72b29e0bb46bc3df318d2f30042b /lib/libdevinfo/devinfo.h
parentb43e53617ad2515831d7410b70fe9385e5fc2b86 (diff)
downloadFreeBSD-src-a4260bf8f13b36400c592d22d847e493853de5eb.zip
FreeBSD-src-a4260bf8f13b36400c592d22d847e493853de5eb.tar.gz
Expose the new kernel data structures to libdevinfo:
o Added dd_pnpinfo, dd_location, dd_devflags, dd_flags and dd_state o Copy/initialize these as necessary. o Document the changes to the interface in devinfo.3.
Diffstat (limited to 'lib/libdevinfo/devinfo.h')
-rw-r--r--lib/libdevinfo/devinfo.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/libdevinfo/devinfo.h b/lib/libdevinfo/devinfo.h
index 63188aa..f31058a 100644
--- a/lib/libdevinfo/devinfo.h
+++ b/lib/libdevinfo/devinfo.h
@@ -33,6 +33,17 @@
typedef __uintptr_t devinfo_handle_t;
#define DEVINFO_ROOT_DEVICE ((devinfo_handle_t)0)
+/*
+ * State of the device.
+ */
+/* XXX not sure if I want a copy here, or expose sys/bus.h */
+typedef enum devinfo_state {
+ DIS_NOTPRESENT, /* not probed or probe failed */
+ DIS_ALIVE, /* probe succeeded */
+ DIS_ATTACHED, /* attach method called */
+ DIS_BUSY /* device is open */
+} devinfo_state_t;
+
struct devinfo_dev {
devinfo_handle_t dd_handle; /* device handle */
devinfo_handle_t dd_parent; /* parent handle */
@@ -40,6 +51,11 @@ struct devinfo_dev {
char *dd_name; /* name of device */
char *dd_desc; /* device description */
char *dd_drivername; /* name of attached driver*/
+ char *dd_pnpinfo; /* pnp info from parent bus */
+ char *dd_location; /* Where bus thinks dev at */
+ uint32_t dd_devflags; /* API flags */
+ uint16_t dd_flags; /* internal dev flags */
+ devinfo_state_t dd_state; /* attacement state of dev */
};
struct devinfo_rman {
OpenPOWER on IntegriCloud