[PATCH 2/3] ndis.sys: Return the IOSB status from ndis_ioctl().
Zebediah Figura
zfigura at codeweavers.com
Wed Sep 22 21:23:50 CDT 2021
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51757
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
---
dlls/ndis.sys/main.c | 4 +++-
dlls/ndis.sys/tests/ndis.c | 4 ++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/dlls/ndis.sys/main.c b/dlls/ndis.sys/main.c
index 94c19ffca53..e1517f77700 100644
--- a/dlls/ndis.sys/main.c
+++ b/dlls/ndis.sys/main.c
@@ -98,6 +98,7 @@ static NTSTATUS WINAPI ndis_ioctl(DEVICE_OBJECT *device, IRP *irp)
{
IO_STACK_LOCATION *irpsp = IoGetCurrentIrpStackLocation( irp );
MIB_IF_ROW2 *netdev = device->DeviceExtension;
+ NTSTATUS status;
TRACE( "ioctl %x insize %u outsize %u\n",
irpsp->Parameters.DeviceIoControl.IoControlCode,
@@ -115,8 +116,9 @@ static NTSTATUS WINAPI ndis_ioctl(DEVICE_OBJECT *device, IRP *irp)
break;
}
+ status = irp->IoStatus.u.Status;
IoCompleteRequest( irp, IO_NO_INCREMENT );
- return STATUS_SUCCESS;
+ return status;
}
static void add_key(const WCHAR *guidstrW, const MIB_IF_ROW2 *netdev)
diff --git a/dlls/ndis.sys/tests/ndis.c b/dlls/ndis.sys/tests/ndis.c
index 2b448949b63..caece671476 100644
--- a/dlls/ndis.sys/tests/ndis.c
+++ b/dlls/ndis.sys/tests/ndis.c
@@ -64,8 +64,8 @@ static void test_device(const WCHAR *service_name, const MIB_IF_ROW2 *row)
status = NtDeviceIoControlFile( netdev, NULL, NULL, NULL, &iosb,
IOCTL_NDIS_QUERY_GLOBAL_STATS, &oid, sizeof(oid), &medium, sizeof(medium) );
todo_wine ok(status == STATUS_INVALID_PARAMETER, "got status %#x\n", status);
- todo_wine ok(iosb.Status == 0xdeadbeef, "got %#x\n", iosb.Status);
- todo_wine ok(iosb.Information == 0xdeadbeef, "got size %#Ix\n", iosb.Information);
+ ok(iosb.Status == 0xdeadbeef, "got %#x\n", iosb.Status);
+ ok(iosb.Information == 0xdeadbeef, "got size %#Ix\n", iosb.Information);
oid = OID_GEN_MEDIA_SUPPORTED;
ret = DeviceIoControl( netdev, IOCTL_NDIS_QUERY_GLOBAL_STATS,
--
2.33.0
More information about the wine-devel
mailing list