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
950c8209
Commit
950c8209
authored
May 21, 2015
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Add support for file I/O on device files.
parent
c4fb1f61
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
file.c
dlls/ntdll/file.c
+3
-2
om.c
dlls/ntdll/tests/om.c
+4
-4
No files found.
dlls/ntdll/file.c
View file @
950c8209
...
...
@@ -847,7 +847,7 @@ NTSTATUS WINAPI NtReadFile(HANDLE hFile, HANDLE hEvent,
goto
done
;
}
}
else
if
(
type
==
FD_TYPE_SERIAL
)
else
if
(
type
==
FD_TYPE_SERIAL
||
type
==
FD_TYPE_DEVICE
)
{
if
(
async_read
&&
(
!
offset
||
offset
->
QuadPart
<
0
))
{
...
...
@@ -872,6 +872,7 @@ NTSTATUS WINAPI NtReadFile(HANDLE hFile, HANDLE hEvent,
{
case
FD_TYPE_FILE
:
case
FD_TYPE_CHAR
:
case
FD_TYPE_DEVICE
:
status
=
length
?
STATUS_END_OF_FILE
:
STATUS_SUCCESS
;
goto
done
;
case
FD_TYPE_SERIAL
:
...
...
@@ -1265,7 +1266,7 @@ NTSTATUS WINAPI NtWriteFile(HANDLE hFile, HANDLE hEvent,
goto
done
;
}
}
else
if
(
type
==
FD_TYPE_SERIAL
)
else
if
(
type
==
FD_TYPE_SERIAL
||
type
==
FD_TYPE_DEVICE
)
{
if
(
async_write
&&
(
!
offset
||
(
offset
->
QuadPart
<
0
&&
offset
->
QuadPart
!=
FILE_WRITE_TO_END_OF_FILE
)))
...
...
dlls/ntdll/tests/om.c
View file @
950c8209
...
...
@@ -1063,14 +1063,14 @@ static void test_null_device(void)
SetLastError
(
0xdeadbeef
);
ret
=
WriteFile
(
null
,
buf
,
sizeof
(
buf
),
&
num_bytes
,
NULL
);
todo_wine
ok
(
!
ret
,
"WriteFile unexpectedly succeeded
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
ok
(
!
ret
,
"WriteFile unexpectedly succeeded
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"expected ERROR_INVALID_PARAMETER, got %u
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
ReadFile
(
null
,
buf
,
sizeof
(
buf
),
&
num_bytes
,
NULL
);
ok
(
!
ret
,
"ReadFile unexpectedly succeeded
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"expected ERROR_INVALID_PARAMETER, got %u
\n
"
,
GetLastError
());
num_bytes
=
0xdeadbeef
;
...
...
@@ -1102,7 +1102,7 @@ static void test_null_device(void)
ret
=
GetOverlappedResult
(
null
,
&
ov
,
&
num_bytes
,
TRUE
);
ok
(
!
ret
,
"GetOverlappedResult unexpectedly succeeded
\n
"
);
}
todo_wine
ok
(
GetLastError
()
==
ERROR_HANDLE_EOF
,
ok
(
GetLastError
()
==
ERROR_HANDLE_EOF
,
"expected ERROR_HANDLE_EOF, got %u
\n
"
,
GetLastError
());
pNtClose
(
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