Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
ff9645b2
Commit
ff9645b2
authored
Apr 15, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Apr 16, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineusb.sys: Implement basic IRP_MJ_PNP requests for the bus FDO.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1a5e5318
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
wineusb.c
dlls/wineusb.sys/wineusb.c
+36
-0
No files found.
dlls/wineusb.sys/wineusb.c
View file @
ff9645b2
...
...
@@ -40,6 +40,41 @@ WINE_DEFAULT_DEBUG_CHANNEL(wineusb);
static
DEVICE_OBJECT
*
bus_fdo
,
*
bus_pdo
;
static
NTSTATUS
fdo_pnp
(
IRP
*
irp
)
{
IO_STACK_LOCATION
*
stack
=
IoGetCurrentIrpStackLocation
(
irp
);
NTSTATUS
ret
;
TRACE
(
"irp %p, minor function %#x.
\n
"
,
irp
,
stack
->
MinorFunction
);
switch
(
stack
->
MinorFunction
)
{
case
IRP_MN_START_DEVICE
:
case
IRP_MN_SURPRISE_REMOVAL
:
irp
->
IoStatus
.
Status
=
STATUS_SUCCESS
;
break
;
case
IRP_MN_REMOVE_DEVICE
:
irp
->
IoStatus
.
Status
=
STATUS_SUCCESS
;
IoSkipCurrentIrpStackLocation
(
irp
);
ret
=
IoCallDriver
(
bus_pdo
,
irp
);
IoDetachDevice
(
bus_pdo
);
IoDeleteDevice
(
bus_fdo
);
return
ret
;
default:
FIXME
(
"Unhandled minor function %#x.
\n
"
,
stack
->
MinorFunction
);
}
IoSkipCurrentIrpStackLocation
(
irp
);
return
IoCallDriver
(
bus_pdo
,
irp
);
}
static
NTSTATUS
WINAPI
driver_pnp
(
DEVICE_OBJECT
*
device
,
IRP
*
irp
)
{
return
fdo_pnp
(
irp
);
}
static
NTSTATUS
WINAPI
driver_add_device
(
DRIVER_OBJECT
*
driver
,
DEVICE_OBJECT
*
pdo
)
{
NTSTATUS
ret
;
...
...
@@ -78,6 +113,7 @@ NTSTATUS WINAPI DriverEntry(DRIVER_OBJECT *driver, UNICODE_STRING *path)
driver
->
DriverExtension
->
AddDevice
=
driver_add_device
;
driver
->
DriverUnload
=
driver_unload
;
driver
->
MajorFunction
[
IRP_MJ_PNP
]
=
driver_pnp
;
return
STATUS_SUCCESS
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment