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
f32600d3
Commit
f32600d3
authored
May 21, 2015
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Check NT symlink first for all devices in QueryDosDeviceW.
parent
c0ac2afb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
18 deletions
+19
-18
volume.c
dlls/kernel32/volume.c
+19
-18
No files found.
dlls/kernel32/volume.c
View file @
f32600d3
...
...
@@ -1282,34 +1282,35 @@ DWORD WINAPI QueryDosDeviceW( LPCWSTR devname, LPWSTR target, DWORD bufsize )
{
WCHAR
*
p
,
name
[
5
];
char
*
path
,
*
link
;
WCHAR
*
buffer
;
DWORD
dosdev
,
ret
=
0
;
if
((
dosdev
=
RtlIsDosDeviceName_U
(
devname
)))
{
memcpy
(
name
,
devname
+
HIWORD
(
dosdev
)
/
sizeof
(
WCHAR
),
LOWORD
(
dosdev
)
);
name
[
LOWORD
(
dosdev
)
/
sizeof
(
WCHAR
)]
=
0
;
devname
=
name
;
}
else
{
WCHAR
*
buffer
;
if
(
!
(
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
dosdevW
)
+
strlenW
(
devname
)
*
sizeof
(
WCHAR
)
)))
{
SetLastError
(
ERROR_OUTOFMEMORY
);
return
0
;
}
memcpy
(
buffer
,
dosdevW
,
sizeof
(
dosdevW
)
);
strcatW
(
buffer
,
devname
);
status
=
read_nt_symlink
(
buffer
,
target
,
bufsize
);
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
if
(
status
)
{
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
0
;
}
if
(
!
(
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
dosdevW
)
+
strlenW
(
devname
)
*
sizeof
(
WCHAR
)
)))
{
SetLastError
(
ERROR_OUTOFMEMORY
);
return
0
;
}
memcpy
(
buffer
,
dosdevW
,
sizeof
(
dosdevW
)
);
strcatW
(
buffer
,
devname
);
status
=
read_nt_symlink
(
buffer
,
target
,
bufsize
);
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
if
(
!
status
)
{
ret
=
strlenW
(
target
)
+
1
;
goto
done
;
}
if
(
!
dosdev
)
/* not a special DOS device */
{
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
0
;
}
/* FIXME: should read NT symlink for all devices */
...
...
@@ -1322,7 +1323,7 @@ DWORD WINAPI QueryDosDeviceW( LPCWSTR devname, LPWSTR target, DWORD bufsize )
ret
=
MultiByteToWideChar
(
CP_UNIXCP
,
0
,
link
,
-
1
,
target
,
bufsize
);
HeapFree
(
GetProcessHeap
(),
0
,
link
);
}
else
if
(
dosdev
)
/* look for device defaults */
else
/* look for device defaults */
{
if
(
!
strcmpiW
(
name
,
auxW
))
{
...
...
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