kernelbase: Return TRUE from DeviceIoControl() if the NT status denotes success.
Likely a similar treatment should be given to other kernelbase APIs, but it's not immediately clear which. Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
bd1aed5319
commit
7b9617ef2f
|
@ -4116,7 +4116,8 @@ BOOL WINAPI DECLSPEC_HOTPATCH DeviceIoControl( HANDLE handle, DWORD code, void *
|
|||
in_buff, in_count, out_buff, out_count );
|
||||
|
||||
if (returned) *returned = piosb->Information;
|
||||
return set_ntstatus( status );
|
||||
if (status == STATUS_PENDING || !NT_SUCCESS( status )) return set_ntstatus( status );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -663,17 +663,17 @@ static void do_return_status(ULONG ioctl, struct return_status_params *params)
|
|||
size = 0xdeadf00d;
|
||||
SetLastError(0xdeadf00d);
|
||||
ret = DeviceIoControl(device, ioctl, params, sizeof(*params), buffer, sizeof(buffer), &size, NULL);
|
||||
todo_wine_if (NT_SUCCESS(expect_status) != !params->iosb_status)
|
||||
todo_wine_if (NT_SUCCESS(expect_status) != NT_SUCCESS(params->iosb_status))
|
||||
ok(ret == NT_SUCCESS(expect_status), "got %d\n", ret);
|
||||
if (NT_SUCCESS(expect_status))
|
||||
{
|
||||
todo_wine_if (params->iosb_status)
|
||||
todo_wine_if (!NT_SUCCESS(params->iosb_status))
|
||||
ok(GetLastError() == 0xdeadf00d, "got error %u\n", GetLastError());
|
||||
}
|
||||
else
|
||||
{
|
||||
todo_wine_if (RtlNtStatusToDosError(expect_status) != RtlNtStatusToDosError(params->iosb_status)
|
||||
|| params->iosb_status == STATUS_PENDING)
|
||||
|| NT_SUCCESS(params->iosb_status))
|
||||
ok(GetLastError() == RtlNtStatusToDosError(expect_status), "got error %u\n", GetLastError());
|
||||
}
|
||||
if (NT_ERROR(expect_status))
|
||||
|
|
Loading…
Reference in New Issue