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
2710aa17
Commit
2710aa17
authored
Apr 16, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Apr 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineusb.sys: Return compatible IDs.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
01315d52
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
wineusb.c
dlls/wineusb.sys/wineusb.c
+25
-0
No files found.
dlls/wineusb.sys/wineusb.c
View file @
2710aa17
...
@@ -301,6 +301,26 @@ static void get_hardware_ids(const struct usb_device *device, WCHAR *buffer)
...
@@ -301,6 +301,26 @@ static void get_hardware_ids(const struct usb_device *device, WCHAR *buffer)
*
buffer
=
0
;
*
buffer
=
0
;
}
}
static
void
get_compatible_ids
(
const
struct
usb_device
*
device
,
WCHAR
*
buffer
)
{
static
const
WCHAR
prot_format
[]
=
{
'U'
,
'S'
,
'B'
,
'\\'
,
'C'
,
'l'
,
'a'
,
's'
,
's'
,
'_'
,
'%'
,
'0'
,
'2'
,
'x'
,
'&'
,
'S'
,
'u'
,
'b'
,
'C'
,
'l'
,
'a'
,
's'
,
's'
,
'_'
,
'%'
,
'0'
,
'2'
,
'x'
,
'&'
,
'P'
,
'r'
,
'o'
,
't'
,
'_'
,
'%'
,
'0'
,
'2'
,
'x'
,
0
};
static
const
WCHAR
subclass_format
[]
=
{
'U'
,
'S'
,
'B'
,
'\\'
,
'C'
,
'l'
,
'a'
,
's'
,
's'
,
'_'
,
'%'
,
'0'
,
'2'
,
'x'
,
'&'
,
'S'
,
'u'
,
'b'
,
'C'
,
'l'
,
'a'
,
's'
,
's'
,
'_'
,
'%'
,
'0'
,
'2'
,
'x'
,
0
};
static
const
WCHAR
class_format
[]
=
{
'U'
,
'S'
,
'B'
,
'\\'
,
'C'
,
'l'
,
'a'
,
's'
,
's'
,
'_'
,
'%'
,
'0'
,
'2'
,
'x'
,
0
};
struct
libusb_device_descriptor
device_desc
;
libusb_get_device_descriptor
(
device
->
libusb_device
,
&
device_desc
);
buffer
+=
sprintfW
(
buffer
,
prot_format
,
device_desc
.
bDeviceClass
,
device_desc
.
bDeviceSubClass
,
device_desc
.
bDeviceProtocol
)
+
1
;
buffer
+=
sprintfW
(
buffer
,
subclass_format
,
device_desc
.
bDeviceClass
,
device_desc
.
bDeviceSubClass
)
+
1
;
buffer
+=
sprintfW
(
buffer
,
class_format
,
device_desc
.
bDeviceClass
)
+
1
;
*
buffer
=
0
;
}
static
NTSTATUS
query_id
(
const
struct
usb_device
*
device
,
IRP
*
irp
,
BUS_QUERY_ID_TYPE
type
)
static
NTSTATUS
query_id
(
const
struct
usb_device
*
device
,
IRP
*
irp
,
BUS_QUERY_ID_TYPE
type
)
{
{
WCHAR
*
id
=
NULL
;
WCHAR
*
id
=
NULL
;
...
@@ -325,6 +345,11 @@ static NTSTATUS query_id(const struct usb_device *device, IRP *irp, BUS_QUERY_ID
...
@@ -325,6 +345,11 @@ static NTSTATUS query_id(const struct usb_device *device, IRP *irp, BUS_QUERY_ID
get_hardware_ids
(
device
,
id
);
get_hardware_ids
(
device
,
id
);
break
;
break
;
case
BusQueryCompatibleIDs
:
if
((
id
=
ExAllocatePool
(
PagedPool
,
(
33
+
25
+
13
+
1
)
*
sizeof
(
WCHAR
))))
get_compatible_ids
(
device
,
id
);
break
;
default:
default:
FIXME
(
"Unhandled ID query type %#x.
\n
"
,
type
);
FIXME
(
"Unhandled ID query type %#x.
\n
"
,
type
);
return
irp
->
IoStatus
.
Status
;
return
irp
->
IoStatus
.
Status
;
...
...
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