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
6bcd695c
Commit
6bcd695c
authored
Oct 20, 2018
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 22, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Set IO_STATUS_BLOCK on non-blocking NtFlushBuffersFile success.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
dd1769a1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
10 deletions
+15
-10
file.c
dlls/ntdll/file.c
+14
-7
file.c
dlls/ntdll/tests/file.c
+0
-2
pipe.c
dlls/ntdll/tests/pipe.c
+1
-1
No files found.
dlls/ntdll/file.c
View file @
6bcd695c
...
...
@@ -3298,13 +3298,15 @@ NTSTATUS WINAPI NtSetEaFile( HANDLE hFile, PIO_STATUS_BLOCK iosb, PVOID buffer,
* Success: 0. IoStatusBlock is updated.
* Failure: An NTSTATUS error code describing the error.
*/
NTSTATUS
WINAPI
NtFlushBuffersFile
(
HANDLE
hFile
,
IO_STATUS_BLOCK
*
IoStatusBlock
)
NTSTATUS
WINAPI
NtFlushBuffersFile
(
HANDLE
hFile
,
IO_STATUS_BLOCK
*
io
)
{
NTSTATUS
ret
;
HANDLE
hEvent
=
NULL
;
HANDLE
wait_handle
;
enum
server_fd_type
type
;
int
fd
,
needs_close
;
if
(
!
io
||
!
virtual_check_buffer_for_write
(
io
,
sizeof
(
io
)
))
return
STATUS_ACCESS_VIOLATION
;
ret
=
server_get_unix_fd
(
hFile
,
FILE_WRITE_DATA
,
&
fd
,
&
needs_close
,
&
type
,
NULL
);
if
(
ret
==
STATUS_ACCESS_DENIED
)
ret
=
server_get_unix_fd
(
hFile
,
FILE_APPEND_DATA
,
&
fd
,
&
needs_close
,
&
type
,
NULL
);
...
...
@@ -3317,16 +3319,21 @@ NTSTATUS WINAPI NtFlushBuffersFile( HANDLE hFile, IO_STATUS_BLOCK* IoStatusBlock
{
SERVER_START_REQ
(
flush
)
{
req
->
async
=
server_async
(
hFile
,
NULL
,
NULL
,
NULL
,
NULL
,
IoStatusBlock
);
req
->
async
=
server_async
(
hFile
,
NULL
,
NULL
,
NULL
,
NULL
,
io
);
ret
=
wine_server_call
(
req
);
hEvent
=
wine_server_ptr_handle
(
reply
->
event
);
wait_handle
=
wine_server_ptr_handle
(
reply
->
event
);
if
(
wait_handle
&&
ret
!=
STATUS_PENDING
)
{
io
->
u
.
Status
=
ret
;
io
->
Information
=
0
;
}
}
SERVER_END_REQ
;
if
(
hEvent
)
if
(
wait_handle
)
{
NtWaitForSingleObject
(
hEvent
,
FALSE
,
NULL
);
ret
=
STATUS_SUCCESS
;
NtWaitForSingleObject
(
wait_handle
,
FALSE
,
NULL
);
ret
=
io
->
u
.
Status
;
}
}
...
...
dlls/ntdll/tests/file.c
View file @
6bcd695c
...
...
@@ -4501,11 +4501,9 @@ static void test_flush_buffers_file(void)
ok
(
hfileread
!=
INVALID_HANDLE_VALUE
,
"could not open temp file, error %d.
\n
"
,
GetLastError
());
status
=
pNtFlushBuffersFile
(
hfile
,
NULL
);
todo_wine
ok
(
status
==
STATUS_ACCESS_VIOLATION
,
"expected STATUS_ACCESS_VIOLATION, got %#x.
\n
"
,
status
);
status
=
pNtFlushBuffersFile
(
hfile
,
(
IO_STATUS_BLOCK
*
)
0xdeadbeaf
);
todo_wine
ok
(
status
==
STATUS_ACCESS_VIOLATION
,
"expected STATUS_ACCESS_VIOLATION, got %#x.
\n
"
,
status
);
status
=
pNtFlushBuffersFile
(
hfile
,
&
io_status_block
);
...
...
dlls/ntdll/tests/pipe.c
View file @
6bcd695c
...
...
@@ -1378,8 +1378,8 @@ static void test_pipe_state(HANDLE pipe, BOOL is_server, DWORD state)
{
ok
(
status
==
STATUS_SUCCESS
,
"status = %x in %s state %u
\n
"
,
status
,
is_server
?
"server"
:
"client"
,
state
);
todo_wine
ok
(
io
.
Status
==
status
,
"io.Status = %x
\n
"
,
io
.
Status
);
ok
(
!
io
.
Information
,
"io.Information = %lx
\n
"
,
io
.
Information
);
}
if
(
state
!=
FILE_PIPE_CONNECTED_STATE
)
...
...
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