You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against 215e2d7fed58ccd7c5e55ad536fb311608b51d26.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 22c72712928594addc4e717d2bb3fd8185db4479 Mon Sep 17 00:00:00 2001
|
||||
From db2c7e03ab42dc8e97a02e8531948c86840b207a Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Fri, 15 Aug 2014 22:23:08 +0200
|
||||
Subject: ntdll: Unify similar code in NtReadFile and FILE_AsyncReadService.
|
||||
@@ -15,14 +15,14 @@ Changes in FILE_AsyncReadService:
|
||||
whereas NtReadFile uses different behaviour based on the fd type.
|
||||
Now both implementations match, and behave the same way.
|
||||
---
|
||||
dlls/ntdll/file.c | 102 ++++++++++++++++++++++++------------------------------
|
||||
1 file changed, 46 insertions(+), 56 deletions(-)
|
||||
dlls/ntdll/file.c | 107 +++++++++++++++++++++++-------------------------------
|
||||
1 file changed, 46 insertions(+), 61 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
|
||||
index 4134b9b..72bbaa2 100644
|
||||
index 1c23f9e..5dab5c9 100644
|
||||
--- a/dlls/ntdll/file.c
|
||||
+++ b/dlls/ntdll/file.c
|
||||
@@ -486,6 +486,45 @@ NTSTATUS FILE_GetNtStatus(void)
|
||||
@@ -484,6 +484,45 @@ NTSTATUS FILE_GetNtStatus(void)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ index 4134b9b..72bbaa2 100644
|
||||
+ case FD_TYPE_DEVICE:
|
||||
+ return length ? STATUS_END_OF_FILE : STATUS_SUCCESS;
|
||||
+ case FD_TYPE_SERIAL:
|
||||
+ return STATUS_PENDING;
|
||||
+ return length ? STATUS_PENDING : STATUS_SUCCESS;
|
||||
+ default:
|
||||
+ return STATUS_PIPE_BROKEN;
|
||||
+ }
|
||||
@@ -68,7 +68,7 @@ index 4134b9b..72bbaa2 100644
|
||||
/***********************************************************************
|
||||
* FILE_AsyncReadService (INTERNAL)
|
||||
*/
|
||||
@@ -493,38 +532,19 @@ static NTSTATUS FILE_AsyncReadService( void *user, IO_STATUS_BLOCK *iosb,
|
||||
@@ -491,38 +530,19 @@ static NTSTATUS FILE_AsyncReadService( void *user, IO_STATUS_BLOCK *iosb,
|
||||
NTSTATUS status, void **apc, void **arg )
|
||||
{
|
||||
struct async_fileio_read *fileio = user;
|
||||
@@ -112,7 +112,7 @@ index 4134b9b..72bbaa2 100644
|
||||
break;
|
||||
|
||||
case STATUS_TIMEOUT:
|
||||
@@ -771,7 +791,6 @@ static NTSTATUS get_io_avail_mode( HANDLE handle, enum server_fd_type type, BOOL
|
||||
@@ -769,7 +789,6 @@ static NTSTATUS get_io_avail_mode( HANDLE handle, enum server_fd_type type, BOOL
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ index 4134b9b..72bbaa2 100644
|
||||
/******************************************************************************
|
||||
* NtReadFile [NTDLL.@]
|
||||
* ZwReadFile [NTDLL.@]
|
||||
@@ -867,38 +886,9 @@ NTSTATUS WINAPI NtReadFile(HANDLE hFile, HANDLE hEvent,
|
||||
@@ -865,43 +884,9 @@ NTSTATUS WINAPI NtReadFile(HANDLE hFile, HANDLE hEvent,
|
||||
|
||||
for (;;)
|
||||
{
|
||||
@@ -142,6 +142,11 @@ index 4134b9b..72bbaa2 100644
|
||||
- status = length ? STATUS_END_OF_FILE : STATUS_SUCCESS;
|
||||
- goto done;
|
||||
- case FD_TYPE_SERIAL:
|
||||
- if (!length)
|
||||
- {
|
||||
- status = STATUS_SUCCESS;
|
||||
- goto done;
|
||||
- }
|
||||
- break;
|
||||
- default:
|
||||
- status = STATUS_PIPE_BROKEN;
|
||||
@@ -162,5 +167,5 @@ index 4134b9b..72bbaa2 100644
|
||||
if (async_read)
|
||||
{
|
||||
--
|
||||
2.6.4
|
||||
2.7.1
|
||||
|
||||
|
@@ -294,7 +294,7 @@ index fd6c605..18ee740 100644
|
||||
@@ -577,11 +586,18 @@ static NTSTATUS read_unix_fd(int fd, char *buf, ULONG *total, ULONG length,
|
||||
return length ? STATUS_END_OF_FILE : STATUS_SUCCESS;
|
||||
case FD_TYPE_SERIAL:
|
||||
return STATUS_PENDING;
|
||||
return length ? STATUS_PENDING : STATUS_SUCCESS;
|
||||
+ case FD_TYPE_PIPE:
|
||||
+ {
|
||||
+ NTSTATUS status = unix_fd_avail( fd, &result );
|
||||
|
Reference in New Issue
Block a user