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
240df39c
Commit
240df39c
authored
Jul 14, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndis.sys: Use nameless unions/structs.
parent
194b4025
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
main.c
dlls/ndis.sys/main.c
+8
-9
No files found.
dlls/ndis.sys/main.c
View file @
240df39c
...
...
@@ -21,7 +21,6 @@
#include <stdarg.h>
#define NONAMELESSUNION
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "windef.h"
...
...
@@ -48,7 +47,7 @@ static void query_global_stats(IRP *irp, const MIB_IF_ROW2 *netdev)
if
(
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
!=
sizeof
(
oid
))
{
irp
->
IoStatus
.
u
.
Status
=
STATUS_INVALID_PARAMETER
;
irp
->
IoStatus
.
Status
=
STATUS_INVALID_PARAMETER
;
return
;
}
oid
=
*
(
DWORD
*
)
irp
->
AssociatedIrp
.
SystemBuffer
;
...
...
@@ -60,19 +59,19 @@ static void query_global_stats(IRP *irp, const MIB_IF_ROW2 *netdev)
{
if
(
len
<
sizeof
(
NDIS_MEDIUM
))
{
irp
->
IoStatus
.
u
.
Status
=
STATUS_INVALID_PARAMETER
;
irp
->
IoStatus
.
Status
=
STATUS_INVALID_PARAMETER
;
break
;
}
*
(
NDIS_MEDIUM
*
)
response
=
netdev
->
MediaType
;
irp
->
IoStatus
.
Information
=
sizeof
(
netdev
->
MediaType
);
irp
->
IoStatus
.
u
.
Status
=
STATUS_SUCCESS
;
irp
->
IoStatus
.
Status
=
STATUS_SUCCESS
;
break
;
}
case
OID_802_3_PERMANENT_ADDRESS
:
{
irp
->
IoStatus
.
Information
=
netdev
->
PhysicalAddressLength
;
if
(
len
<
netdev
->
PhysicalAddressLength
)
irp
->
IoStatus
.
u
.
Status
=
STATUS_INVALID_PARAMETER
;
irp
->
IoStatus
.
Status
=
STATUS_INVALID_PARAMETER
;
else
memcpy
(
response
,
netdev
->
PermanentPhysicalAddress
,
sizeof
(
netdev
->
PermanentPhysicalAddress
)
);
break
;
...
...
@@ -81,7 +80,7 @@ static void query_global_stats(IRP *irp, const MIB_IF_ROW2 *netdev)
{
irp
->
IoStatus
.
Information
=
netdev
->
PhysicalAddressLength
;
if
(
len
<
netdev
->
PhysicalAddressLength
)
irp
->
IoStatus
.
u
.
Status
=
STATUS_INVALID_PARAMETER
;
irp
->
IoStatus
.
Status
=
STATUS_INVALID_PARAMETER
;
else
memcpy
(
response
,
netdev
->
PhysicalAddress
,
sizeof
(
netdev
->
PhysicalAddress
)
);
break
;
...
...
@@ -89,7 +88,7 @@ static void query_global_stats(IRP *irp, const MIB_IF_ROW2 *netdev)
}
default:
FIXME
(
"Unsupported OID %lx
\n
"
,
oid
);
irp
->
IoStatus
.
u
.
Status
=
STATUS_INVALID_PARAMETER
;
irp
->
IoStatus
.
Status
=
STATUS_INVALID_PARAMETER
;
break
;
}
}
...
...
@@ -112,11 +111,11 @@ static NTSTATUS WINAPI ndis_ioctl(DEVICE_OBJECT *device, IRP *irp)
break
;
default:
FIXME
(
"ioctl %lx not supported
\n
"
,
irpsp
->
Parameters
.
DeviceIoControl
.
IoControlCode
);
irp
->
IoStatus
.
u
.
Status
=
STATUS_NOT_SUPPORTED
;
irp
->
IoStatus
.
Status
=
STATUS_NOT_SUPPORTED
;
break
;
}
status
=
irp
->
IoStatus
.
u
.
Status
;
status
=
irp
->
IoStatus
.
Status
;
IoCompleteRequest
(
irp
,
IO_NO_INCREMENT
);
return
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