[bus] Add QueryDevText member to WV_S_BUS_T
authorShao Miller <Shao.Miller@yrdsb.edu.on.ca>
Wed, 29 Dec 2010 18:26:22 +0000 (13:26 -0500)
committerShao Miller <Shao.Miller@yrdsb.edu.on.ca>
Wed, 29 Dec 2010 18:26:22 +0000 (13:26 -0500)
A driver implementing a bus should be responsible for
handling IRP_MJ_PNP IRP_MN_QUERY_DEVICE_TEXT.

src/include/bus.h

index 1aba1c8..cf3d050 100644 (file)
 typedef void STDCALL WV_F_BUS_THREAD(IN WV_SP_BUS_T);
 typedef WV_F_BUS_THREAD * WV_FP_BUS_THREAD;
 
+/**
+ * A bus PnP routine.
+ *
+ * @v bus               The bus to receive the PnP IRP.
+ * @v irp               The IRP to process.
+ * @ret NTSTATUS        The status of the operation.
+ */
+typedef NTSTATUS STDCALL WV_F_BUS_PNP(IN WV_SP_BUS_T, IN PIRP);
+typedef WV_F_BUS_PNP * WV_FP_BUS_PNP;
+
 /* Device state. */
 typedef enum WV_BUS_STATE {
     WvBusStateNotStarted,
@@ -64,6 +74,7 @@ typedef struct WV_BUS_T {
     KEVENT ThreadStopped;
     WV_E_BUS_STATE OldState;
     WV_E_BUS_STATE State;
+    WV_FP_BUS_PNP QueryDevText;
     struct {
         LIST_ENTRY Nodes;
         USHORT NodeCount;