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
406309e1
Commit
406309e1
authored
Nov 29, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mountmgr: Build with msvcrt.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
fd5acd68
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
50 deletions
+40
-50
Makefile.in
dlls/mountmgr.sys/Makefile.in
+1
-1
device.c
dlls/mountmgr.sys/device.c
+31
-37
mountmgr.c
dlls/mountmgr.sys/mountmgr.c
+8
-12
No files found.
dlls/mountmgr.sys/Makefile.in
View file @
406309e1
...
...
@@ -5,7 +5,7 @@ DELAYIMPORTS = user32
EXTRAINCL
=
$(DBUS_CFLAGS)
$(HAL_CFLAGS)
EXTRALIBS
=
$(DISKARBITRATION_LIBS)
$(SYSTEMCONFIGURATION_LIBS)
$(CORESERVICES_LIBS)
$(SECURITY_LIBS)
EXTRADLLFLAGS
=
-Wl
,--subsystem,native
-mcygwin
EXTRADLLFLAGS
=
-Wl
,--subsystem,native
C_SRCS
=
\
cred.c
\
...
...
dlls/mountmgr.sys/device.c
View file @
406309e1
This diff is collapsed.
Click to expand it.
dlls/mountmgr.sys/mountmgr.c
View file @
406309e1
...
...
@@ -18,11 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdarg.h>
#include <stdlib.h>
#include <unistd.h>
#define NONAMELESSUNION
...
...
@@ -30,7 +27,6 @@
#include "winreg.h"
#include "unixlib.h"
#include "wine/list.h"
#include "wine/unicode.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
mountmgr
);
...
...
@@ -69,14 +65,14 @@ static struct mount_point *add_mount_point( DEVICE_OBJECT *device, UNICODE_STRIN
{
struct
mount_point
*
mount
;
WCHAR
*
str
;
UINT
len
=
(
strlenW
(
link
)
+
1
)
*
sizeof
(
WCHAR
)
+
device_name
->
Length
+
sizeof
(
WCHAR
);
UINT
len
=
(
l
strlenW
(
link
)
+
1
)
*
sizeof
(
WCHAR
)
+
device_name
->
Length
+
sizeof
(
WCHAR
);
if
(
!
(
mount
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
sizeof
(
*
mount
)
+
len
)))
return
NULL
;
str
=
(
WCHAR
*
)(
mount
+
1
);
strcpyW
(
str
,
link
);
l
strcpyW
(
str
,
link
);
RtlInitUnicodeString
(
&
mount
->
link
,
str
);
str
+=
strlenW
(
str
)
+
1
;
str
+=
l
strlenW
(
str
)
+
1
;
memcpy
(
str
,
device_name
->
Buffer
,
device_name
->
Length
);
str
[
device_name
->
Length
/
sizeof
(
WCHAR
)]
=
0
;
mount
->
name
.
Buffer
=
str
;
...
...
@@ -99,7 +95,7 @@ struct mount_point *add_dosdev_mount_point( DEVICE_OBJECT *device, UNICODE_STRIN
static
const
WCHAR
driveW
[]
=
{
'\\'
,
'D'
,
'o'
,
's'
,
'D'
,
'e'
,
'v'
,
'i'
,
'c'
,
'e'
,
's'
,
'\\'
,
'%'
,
'c'
,
':'
,
0
};
WCHAR
link
[
sizeof
(
driveW
)];
s
printfW
(
link
,
driveW
,
'A'
+
drive
);
s
wprintf
(
link
,
ARRAY_SIZE
(
link
)
,
driveW
,
'A'
+
drive
);
return
add_mount_point
(
device
,
device_name
,
link
);
}
...
...
@@ -113,7 +109,7 @@ struct mount_point *add_volume_mount_point( DEVICE_OBJECT *device, UNICODE_STRIN
'%'
,
'0'
,
'2'
,
'x'
,
'%'
,
'0'
,
'2'
,
'x'
,
'%'
,
'0'
,
'2'
,
'x'
,
'%'
,
'0'
,
'2'
,
'x'
,
'}'
,
0
};
WCHAR
link
[
sizeof
(
volumeW
)];
s
printfW
(
link
,
volumeW
,
guid
->
Data1
,
guid
->
Data2
,
guid
->
Data3
,
s
wprintf
(
link
,
ARRAY_SIZE
(
link
)
,
volumeW
,
guid
->
Data1
,
guid
->
Data2
,
guid
->
Data3
,
guid
->
Data4
[
0
],
guid
->
Data4
[
1
],
guid
->
Data4
[
2
],
guid
->
Data4
[
3
],
guid
->
Data4
[
4
],
guid
->
Data4
[
5
],
guid
->
Data4
[
6
],
guid
->
Data4
[
7
]);
return
add_mount_point
(
device
,
device_name
,
link
);
...
...
@@ -137,14 +133,14 @@ static BOOL matching_mount_point( const struct mount_point *mount, const MOUNTMG
{
const
WCHAR
*
name
=
(
const
WCHAR
*
)((
const
char
*
)
spec
+
spec
->
SymbolicLinkNameOffset
);
if
(
spec
->
SymbolicLinkNameLength
!=
mount
->
link
.
Length
)
return
FALSE
;
if
(
strncmpiW
(
name
,
mount
->
link
.
Buffer
,
mount
->
link
.
Length
/
sizeof
(
WCHAR
)))
if
(
wcsnicmp
(
name
,
mount
->
link
.
Buffer
,
mount
->
link
.
Length
/
sizeof
(
WCHAR
)))
return
FALSE
;
}
if
(
spec
->
DeviceNameOffset
)
{
const
WCHAR
*
name
=
(
const
WCHAR
*
)((
const
char
*
)
spec
+
spec
->
DeviceNameOffset
);
if
(
spec
->
DeviceNameLength
!=
mount
->
name
.
Length
)
return
FALSE
;
if
(
strncmpiW
(
name
,
mount
->
name
.
Buffer
,
mount
->
name
.
Length
/
sizeof
(
WCHAR
)))
if
(
wcsnicmp
(
name
,
mount
->
name
.
Buffer
,
mount
->
name
.
Length
/
sizeof
(
WCHAR
)))
return
FALSE
;
}
if
(
spec
->
UniqueIdOffset
)
...
...
@@ -236,7 +232,7 @@ static NTSTATUS define_unix_drive( const void *in_buff, SIZE_T insize )
{
const
struct
mountmgr_unix_drive
*
input
=
in_buff
;
const
char
*
mount_point
=
NULL
,
*
device
=
NULL
;
WCHAR
letter
=
to
lowerW
(
input
->
letter
);
WCHAR
letter
=
to
wlower
(
input
->
letter
);
if
(
letter
<
'a'
||
letter
>
'z'
)
return
STATUS_INVALID_PARAMETER
;
if
(
input
->
type
>
DRIVE_RAMDISK
)
return
STATUS_INVALID_PARAMETER
;
...
...
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