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 @@
...
@@ -21,7 +21,6 @@
#include <stdarg.h>
#include <stdarg.h>
#define NONAMELESSUNION
#include "ntstatus.h"
#include "ntstatus.h"
#define WIN32_NO_STATUS
#define WIN32_NO_STATUS
#include "windef.h"
#include "windef.h"
...
@@ -48,7 +47,7 @@ static void query_global_stats(IRP *irp, const MIB_IF_ROW2 *netdev)
...
@@ -48,7 +47,7 @@ static void query_global_stats(IRP *irp, const MIB_IF_ROW2 *netdev)
if
(
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
!=
sizeof
(
oid
))
if
(
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
!=
sizeof
(
oid
))
{
{
irp
->
IoStatus
.
u
.
Status
=
STATUS_INVALID_PARAMETER
;
irp
->
IoStatus
.
Status
=
STATUS_INVALID_PARAMETER
;
return
;
return
;
}
}
oid
=
*
(
DWORD
*
)
irp
->
AssociatedIrp
.
SystemBuffer
;
oid
=
*
(
DWORD
*
)
irp
->
AssociatedIrp
.
SystemBuffer
;
...
@@ -60,19 +59,19 @@ static void query_global_stats(IRP *irp, const MIB_IF_ROW2 *netdev)
...
@@ -60,19 +59,19 @@ static void query_global_stats(IRP *irp, const MIB_IF_ROW2 *netdev)
{
{
if
(
len
<
sizeof
(
NDIS_MEDIUM
))
if
(
len
<
sizeof
(
NDIS_MEDIUM
))
{
{
irp
->
IoStatus
.
u
.
Status
=
STATUS_INVALID_PARAMETER
;
irp
->
IoStatus
.
Status
=
STATUS_INVALID_PARAMETER
;
break
;
break
;
}
}
*
(
NDIS_MEDIUM
*
)
response
=
netdev
->
MediaType
;
*
(
NDIS_MEDIUM
*
)
response
=
netdev
->
MediaType
;
irp
->
IoStatus
.
Information
=
sizeof
(
netdev
->
MediaType
);
irp
->
IoStatus
.
Information
=
sizeof
(
netdev
->
MediaType
);
irp
->
IoStatus
.
u
.
Status
=
STATUS_SUCCESS
;
irp
->
IoStatus
.
Status
=
STATUS_SUCCESS
;
break
;
break
;
}
}
case
OID_802_3_PERMANENT_ADDRESS
:
case
OID_802_3_PERMANENT_ADDRESS
:
{
{
irp
->
IoStatus
.
Information
=
netdev
->
PhysicalAddressLength
;
irp
->
IoStatus
.
Information
=
netdev
->
PhysicalAddressLength
;
if
(
len
<
netdev
->
PhysicalAddressLength
)
if
(
len
<
netdev
->
PhysicalAddressLength
)
irp
->
IoStatus
.
u
.
Status
=
STATUS_INVALID_PARAMETER
;
irp
->
IoStatus
.
Status
=
STATUS_INVALID_PARAMETER
;
else
else
memcpy
(
response
,
netdev
->
PermanentPhysicalAddress
,
sizeof
(
netdev
->
PermanentPhysicalAddress
)
);
memcpy
(
response
,
netdev
->
PermanentPhysicalAddress
,
sizeof
(
netdev
->
PermanentPhysicalAddress
)
);
break
;
break
;
...
@@ -81,7 +80,7 @@ static void query_global_stats(IRP *irp, const MIB_IF_ROW2 *netdev)
...
@@ -81,7 +80,7 @@ static void query_global_stats(IRP *irp, const MIB_IF_ROW2 *netdev)
{
{
irp
->
IoStatus
.
Information
=
netdev
->
PhysicalAddressLength
;
irp
->
IoStatus
.
Information
=
netdev
->
PhysicalAddressLength
;
if
(
len
<
netdev
->
PhysicalAddressLength
)
if
(
len
<
netdev
->
PhysicalAddressLength
)
irp
->
IoStatus
.
u
.
Status
=
STATUS_INVALID_PARAMETER
;
irp
->
IoStatus
.
Status
=
STATUS_INVALID_PARAMETER
;
else
else
memcpy
(
response
,
netdev
->
PhysicalAddress
,
sizeof
(
netdev
->
PhysicalAddress
)
);
memcpy
(
response
,
netdev
->
PhysicalAddress
,
sizeof
(
netdev
->
PhysicalAddress
)
);
break
;
break
;
...
@@ -89,7 +88,7 @@ static void query_global_stats(IRP *irp, const MIB_IF_ROW2 *netdev)
...
@@ -89,7 +88,7 @@ static void query_global_stats(IRP *irp, const MIB_IF_ROW2 *netdev)
}
}
default:
default:
FIXME
(
"Unsupported OID %lx
\n
"
,
oid
);
FIXME
(
"Unsupported OID %lx
\n
"
,
oid
);
irp
->
IoStatus
.
u
.
Status
=
STATUS_INVALID_PARAMETER
;
irp
->
IoStatus
.
Status
=
STATUS_INVALID_PARAMETER
;
break
;
break
;
}
}
}
}
...
@@ -112,11 +111,11 @@ static NTSTATUS WINAPI ndis_ioctl(DEVICE_OBJECT *device, IRP *irp)
...
@@ -112,11 +111,11 @@ static NTSTATUS WINAPI ndis_ioctl(DEVICE_OBJECT *device, IRP *irp)
break
;
break
;
default:
default:
FIXME
(
"ioctl %lx not supported
\n
"
,
irpsp
->
Parameters
.
DeviceIoControl
.
IoControlCode
);
FIXME
(
"ioctl %lx not supported
\n
"
,
irpsp
->
Parameters
.
DeviceIoControl
.
IoControlCode
);
irp
->
IoStatus
.
u
.
Status
=
STATUS_NOT_SUPPORTED
;
irp
->
IoStatus
.
Status
=
STATUS_NOT_SUPPORTED
;
break
;
break
;
}
}
status
=
irp
->
IoStatus
.
u
.
Status
;
status
=
irp
->
IoStatus
.
Status
;
IoCompleteRequest
(
irp
,
IO_NO_INCREMENT
);
IoCompleteRequest
(
irp
,
IO_NO_INCREMENT
);
return
status
;
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