Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
27ecc6ba
Commit
27ecc6ba
authored
Jul 07, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Fix iosb handling in NtCancelIoFile().
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3a32ea8e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
7 deletions
+33
-7
change.c
dlls/ntdll/tests/change.c
+15
-3
file.c
dlls/ntdll/unix/file.c
+18
-4
No files found.
dlls/ntdll/tests/change.c
View file @
27ecc6ba
...
...
@@ -168,7 +168,7 @@ static void test_ntncdf_async(void)
HANDLE
hdir
,
hEvent
;
char
buffer
[
0x1000
];
DWORD
fflags
,
filter
=
0
;
IO_STATUS_BLOCK
iosb
,
iosb2
;
IO_STATUS_BLOCK
iosb
,
iosb2
,
iosb3
;
WCHAR
path
[
MAX_PATH
],
subdir
[
MAX_PATH
];
static
const
WCHAR
szBoo
[]
=
{
'\\'
,
'b'
,
'o'
,
'o'
,
0
};
static
const
WCHAR
szHoo
[]
=
{
'\\'
,
'h'
,
'o'
,
'o'
,
0
};
...
...
@@ -293,16 +293,28 @@ static void test_ntncdf_async(void)
ok
(
U
(
iosb
).
Status
==
0x01234567
,
"status set too soon
\n
"
);
ok
(
iosb
.
Information
==
0x12345678
,
"info set too soon
\n
"
);
r
=
pNtCancelIoFile
(
hdir
,
&
iosb
);
U
(
iosb3
).
Status
=
0x111111
;
iosb3
.
Information
=
0x222222
;
r
=
pNtCancelIoFile
(
hdir
,
&
iosb3
);
ok
(
r
==
STATUS_SUCCESS
,
"cancel failed
\n
"
);
CloseHandle
(
hdir
);
ok
(
U
(
iosb
).
Status
==
STATUS_
SUCCESS
,
"status wrong
\n
"
);
ok
(
U
(
iosb
).
Status
==
STATUS_
CANCELLED
,
"status wrong %x
\n
"
,
U
(
iosb
).
Status
);
ok
(
U
(
iosb2
).
Status
==
STATUS_CANCELLED
,
"status wrong %x
\n
"
,
U
(
iosb2
).
Status
);
ok
(
U
(
iosb3
).
Status
==
STATUS_SUCCESS
,
"status wrong %x
\n
"
,
U
(
iosb3
).
Status
);
ok
(
iosb
.
Information
==
0
,
"info wrong
\n
"
);
ok
(
iosb2
.
Information
==
0
,
"info wrong
\n
"
);
ok
(
iosb3
.
Information
==
0
,
"info wrong
\n
"
);
U
(
iosb3
).
Status
=
0x111111
;
iosb3
.
Information
=
0x222222
;
r
=
pNtCancelIoFile
(
hdir
,
&
iosb3
);
ok
(
r
==
STATUS_INVALID_HANDLE
,
"cancel failed %x
\n
"
,
r
);
ok
(
U
(
iosb3
).
Status
==
0x111111
,
"status wrong %x
\n
"
,
U
(
iosb3
).
Status
);
ok
(
iosb3
.
Information
==
0x222222
,
"info wrong
\n
"
);
r
=
RemoveDirectoryW
(
path
);
ok
(
r
==
TRUE
,
"failed to remove directory
\n
"
);
...
...
dlls/ntdll/unix/file.c
View file @
27ecc6ba
...
...
@@ -5931,16 +5931,23 @@ NTSTATUS WINAPI NtFlushBuffersFile( HANDLE handle, IO_STATUS_BLOCK *io )
*/
NTSTATUS
WINAPI
NtCancelIoFile
(
HANDLE
handle
,
IO_STATUS_BLOCK
*
io_status
)
{
NTSTATUS
status
;
TRACE
(
"%p %p
\n
"
,
handle
,
io_status
);
SERVER_START_REQ
(
cancel_async
)
{
req
->
handle
=
wine_server_obj_handle
(
handle
);
req
->
only_thread
=
TRUE
;
io_status
->
u
.
Status
=
wine_server_call
(
req
);
if
(
!
(
status
=
wine_server_call
(
req
)))
{
io_status
->
u
.
Status
=
status
;
io_status
->
Information
=
0
;
}
}
SERVER_END_REQ
;
return
io_status
->
u
.
Status
;
return
status
;
}
...
...
@@ -5949,16 +5956,23 @@ NTSTATUS WINAPI NtCancelIoFile( HANDLE handle, IO_STATUS_BLOCK *io_status )
*/
NTSTATUS
WINAPI
NtCancelIoFileEx
(
HANDLE
handle
,
IO_STATUS_BLOCK
*
io
,
IO_STATUS_BLOCK
*
io_status
)
{
NTSTATUS
status
;
TRACE
(
"%p %p %p
\n
"
,
handle
,
io
,
io_status
);
SERVER_START_REQ
(
cancel_async
)
{
req
->
handle
=
wine_server_obj_handle
(
handle
);
req
->
iosb
=
wine_server_client_ptr
(
io
);
io_status
->
u
.
Status
=
wine_server_call
(
req
);
if
(
!
(
status
=
wine_server_call
(
req
)))
{
io_status
->
u
.
Status
=
status
;
io_status
->
Information
=
0
;
}
}
SERVER_END_REQ
;
return
io_status
->
u
.
Status
;
return
status
;
}
...
...
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