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
9050b58f
Commit
9050b58f
authored
Oct 30, 2018
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 30, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Correctly return result of blocking NtFlushBuffersFile.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4fc5aff5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
pipe.c
dlls/kernel32/tests/pipe.c
+1
-1
file.c
dlls/ntdll/file.c
+11
-1
No files found.
dlls/kernel32/tests/pipe.c
View file @
9050b58f
...
...
@@ -2852,7 +2852,7 @@ static DWORD CALLBACK flush_proc(HANDLE pipe)
if
(
expected_flush_error
==
ERROR_SUCCESS
)
ok
(
res
,
"FlushFileBuffers failed: %u
\n
"
,
GetLastError
());
else
todo_wine
ok
(
!
res
&&
GetLastError
()
==
expected_flush_error
,
"FlushFileBuffers failed: %u
\n
"
,
GetLastError
());
ok
(
!
res
&&
GetLastError
()
==
expected_flush_error
,
"FlushFileBuffers failed: %u
\n
"
,
GetLastError
());
return
0
;
}
...
...
dlls/ntdll/file.c
View file @
9050b58f
...
...
@@ -3317,9 +3317,17 @@ NTSTATUS WINAPI NtFlushBuffersFile( HANDLE hFile, IO_STATUS_BLOCK *io )
}
else
if
(
ret
!=
STATUS_ACCESS_DENIED
)
{
struct
async_irp
*
async
;
if
(
!
(
async
=
(
struct
async_irp
*
)
alloc_fileio
(
sizeof
(
*
async
),
irp_completion
,
hFile
)))
return
STATUS_NO_MEMORY
;
async
->
event
=
NULL
;
async
->
buffer
=
NULL
;
async
->
size
=
0
;
SERVER_START_REQ
(
flush
)
{
req
->
async
=
server_async
(
hFile
,
NULL
,
NULL
,
NULL
,
NULL
,
io
);
req
->
async
=
server_async
(
hFile
,
&
async
->
io
,
NULL
,
NULL
,
NULL
,
io
);
ret
=
wine_server_call
(
req
);
wait_handle
=
wine_server_ptr_handle
(
reply
->
event
);
if
(
wait_handle
&&
ret
!=
STATUS_PENDING
)
...
...
@@ -3330,6 +3338,8 @@ NTSTATUS WINAPI NtFlushBuffersFile( HANDLE hFile, IO_STATUS_BLOCK *io )
}
SERVER_END_REQ
;
if
(
ret
!=
STATUS_PENDING
)
RtlFreeHeap
(
GetProcessHeap
(),
0
,
async
);
if
(
wait_handle
)
{
NtWaitForSingleObject
(
wait_handle
,
FALSE
,
NULL
);
...
...
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