Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
fe3bc8c5
Commit
fe3bc8c5
authored
Sep 30, 2013
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Sep 30, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Unify the checks for asynchronous NtReadFile behaviour.
parent
5e5fb997
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
file.c
dlls/ntdll/file.c
+7
-5
No files found.
dlls/ntdll/file.c
View file @
fe3bc8c5
...
...
@@ -587,7 +587,7 @@ NTSTATUS WINAPI NtReadFile(HANDLE hFile, HANDLE hEvent,
ULONG
total
=
0
;
enum
server_fd_type
type
;
ULONG_PTR
cvalue
=
apc
?
0
:
(
ULONG_PTR
)
apc_user
;
BOOL
send_completion
=
FALSE
;
BOOL
send_completion
=
FALSE
,
async_read
;
TRACE
(
"(%p,%p,%p,%p,%p,%p,0x%08x,%p,%p),partial stub!
\n
"
,
hFile
,
hEvent
,
apc
,
apc_user
,
io_status
,
buffer
,
length
,
offset
,
key
);
...
...
@@ -604,9 +604,11 @@ NTSTATUS WINAPI NtReadFile(HANDLE hFile, HANDLE hEvent,
goto
done
;
}
async_read
=
!
(
options
&
(
FILE_SYNCHRONOUS_IO_ALERT
|
FILE_SYNCHRONOUS_IO_NONALERT
));
if
(
type
==
FD_TYPE_FILE
)
{
if
(
!
(
options
&
(
FILE_SYNCHRONOUS_IO_ALERT
|
FILE_SYNCHRONOUS_IO_NONALERT
))
&&
(
!
offset
||
offset
->
QuadPart
<
0
))
if
(
async_read
&&
(
!
offset
||
offset
->
QuadPart
<
0
))
{
status
=
STATUS_INVALID_PARAMETER
;
goto
done
;
...
...
@@ -623,7 +625,7 @@ NTSTATUS WINAPI NtReadFile(HANDLE hFile, HANDLE hEvent,
goto
done
;
}
}
if
(
options
&
(
FILE_SYNCHRONOUS_IO_ALERT
|
FILE_SYNCHRONOUS_IO_NONALERT
)
)
if
(
!
async_read
)
/* update file pointer position */
lseek
(
unix_handle
,
offset
->
QuadPart
+
result
,
SEEK_SET
);
...
...
@@ -634,7 +636,7 @@ NTSTATUS WINAPI NtReadFile(HANDLE hFile, HANDLE hEvent,
}
else
if
(
type
==
FD_TYPE_SERIAL
)
{
if
(
!
(
options
&
(
FILE_SYNCHRONOUS_IO_ALERT
|
FILE_SYNCHRONOUS_IO_NONALERT
))
&&
(
!
offset
||
offset
->
QuadPart
<
0
))
if
(
async_read
&&
(
!
offset
||
offset
->
QuadPart
<
0
))
{
status
=
STATUS_INVALID_PARAMETER
;
goto
done
;
...
...
@@ -675,7 +677,7 @@ NTSTATUS WINAPI NtReadFile(HANDLE hFile, HANDLE hEvent,
goto
done
;
}
if
(
!
(
options
&
(
FILE_SYNCHRONOUS_IO_ALERT
|
FILE_SYNCHRONOUS_IO_NONALERT
))
)
if
(
async_read
)
{
async_fileio_read
*
fileio
;
BOOL
avail_mode
;
...
...
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