[5/5] ntdll: Make asynchronous NtReadFile on a disk file always return STATUS_PENDING.

Dmitry Timoshkov dmitry at baikal.ru
Mon Sep 30 06:19:47 CDT 2013


---
 dlls/ntdll/file.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index 772564b..1366848 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -761,7 +761,8 @@ err:
     if (needs_close) close( unix_handle );
     if (status == STATUS_SUCCESS)
     {
-        io_status->u.Status = status;
+        if (async_read && type == FD_TYPE_FILE) status = STATUS_PENDING;
+        io_status->u.Status = STATUS_SUCCESS;
         io_status->Information = total;
         TRACE("= SUCCESS (%u)\n", total);
         if (hEvent) NtSetEvent( hEvent, NULL );
-- 
1.8.3.4




More information about the wine-patches mailing list