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
60f11d29
Commit
60f11d29
authored
Dec 01, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 01, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase: Simplify CreateFileW.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
141e53ba
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
16 deletions
+4
-16
file.c
dlls/kernelbase/file.c
+4
-16
No files found.
dlls/kernelbase/file.c
View file @
60f11d29
...
...
@@ -738,7 +738,6 @@ HANDLE WINAPI DECLSPEC_HOTPATCH CreateFileW( LPCWSTR filename, DWORD access, DWO
UNICODE_STRING
nameW
;
IO_STATUS_BLOCK
io
;
HANDLE
ret
;
DWORD
dosdev
;
const
WCHAR
*
vxd_name
=
NULL
;
SECURITY_QUALITY_OF_SERVICE
qos
;
...
...
@@ -770,25 +769,14 @@ HANDLE WINAPI DECLSPEC_HOTPATCH CreateFileW( LPCWSTR filename, DWORD access, DWO
(
sharing
&
FILE_SHARE_DELETE
)
?
"FILE_SHARE_DELETE "
:
""
,
creation
,
attributes
);
if
(
!
wcsncmp
(
filename
,
L"
\\\\
.
\\
"
,
4
))
{
if
((
filename
[
4
]
&&
filename
[
5
]
==
':'
&&
!
filename
[
6
])
||
!
wcsnicmp
(
filename
+
4
,
L"PIPE
\\
"
,
5
)
||
!
wcsnicmp
(
filename
+
4
,
L"MAILSLOT
\\
"
,
9
))
{
dosdev
=
0
;
}
else
if
((
dosdev
=
RtlIsDosDeviceName_U
(
filename
+
4
)))
{
dosdev
+=
MAKELONG
(
0
,
4
*
sizeof
(
WCHAR
)
);
/* adjust position to start of filename */
}
else
if
(
GetVersion
()
&
0x80000000
)
if
((
GetVersion
()
&
0x80000000
)
&&
!
wcsncmp
(
filename
,
L"
\\\\
.
\\
"
,
4
)
&&
!
RtlIsDosDeviceName_U
(
filename
+
4
)
&&
wcsnicmp
(
filename
+
4
,
L"PIPE
\\
"
,
5
)
&&
wcsnicmp
(
filename
+
4
,
L"MAILSLOT
\\
"
,
9
))
{
vxd_name
=
filename
+
4
;
if
(
!
creation
)
creation
=
OPEN_EXISTING
;
}
}
else
dosdev
=
RtlIsDosDeviceName_U
(
filename
);
if
(
creation
<
CREATE_NEW
||
creation
>
TRUNCATE_EXISTING
)
{
...
...
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