Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lorenzo Ferrillo
wine
Commits
a6b6c0eb
Commit
a6b6c0eb
authored
13 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
mountmgr: Create a symlink in DosDevices for cdroms.
parent
5e5cbcc8
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/mountmgr.sys/device.c
+20
-14
20 additions, 14 deletions
dlls/mountmgr.sys/device.c
with
20 additions
and
14 deletions
dlls/mountmgr.sys/device.c
+
20
−
14
View file @
a6b6c0eb
...
...
@@ -195,11 +195,13 @@ static NTSTATUS create_disk_device( enum device_type type, struct disk_device **
static
const
WCHAR
cdromW
[]
=
{
'\\'
,
'D'
,
'e'
,
'v'
,
'i'
,
'c'
,
'e'
,
'\\'
,
'C'
,
'd'
,
'R'
,
'o'
,
'm'
,
'%'
,
'u'
,
0
};
static
const
WCHAR
floppyW
[]
=
{
'\\'
,
'D'
,
'e'
,
'v'
,
'i'
,
'c'
,
'e'
,
'\\'
,
'F'
,
'l'
,
'o'
,
'p'
,
'p'
,
'y'
,
'%'
,
'u'
,
0
};
static
const
WCHAR
ramdiskW
[]
=
{
'\\'
,
'D'
,
'e'
,
'v'
,
'i'
,
'c'
,
'e'
,
'\\'
,
'R'
,
'a'
,
'm'
,
'd'
,
'i'
,
's'
,
'k'
,
'%'
,
'u'
,
0
};
static
const
WCHAR
cdromlinkW
[]
=
{
'\\'
,
'?'
,
'?'
,
'\\'
,
'C'
,
'd'
,
'R'
,
'o'
,
'm'
,
'%'
,
'u'
,
0
};
static
const
WCHAR
physdriveW
[]
=
{
'\\'
,
'?'
,
'?'
,
'\\'
,
'P'
,
'h'
,
'y'
,
's'
,
'i'
,
'c'
,
'a'
,
'l'
,
'D'
,
'r'
,
'i'
,
'v'
,
'e'
,
'%'
,
'u'
,
0
};
UINT
i
,
first
=
0
;
NTSTATUS
status
=
0
;
const
WCHAR
*
format
=
NULL
;
const
WCHAR
*
link_format
=
NULL
;
UNICODE_STRING
name
;
DEVICE_OBJECT
*
dev_obj
;
struct
disk_device
*
device
;
...
...
@@ -210,6 +212,7 @@ static NTSTATUS create_disk_device( enum device_type type, struct disk_device **
case
DEVICE_HARDDISK
:
case
DEVICE_NETWORK
:
/* FIXME */
format
=
harddiskW
;
link_format
=
physdriveW
;
break
;
case
DEVICE_HARDDISK_VOL
:
format
=
harddiskvolW
;
...
...
@@ -221,6 +224,7 @@ static NTSTATUS create_disk_device( enum device_type type, struct disk_device **
case
DEVICE_CDROM
:
case
DEVICE_DVD
:
format
=
cdromW
;
link_format
=
cdromlinkW
;
break
;
case
DEVICE_RAMDISK
:
format
=
ramdiskW
;
...
...
@@ -246,6 +250,19 @@ static NTSTATUS create_disk_device( enum device_type type, struct disk_device **
device
->
unix_mount
=
NULL
;
device
->
symlink
.
Buffer
=
NULL
;
if
(
link_format
)
{
UNICODE_STRING
symlink
;
symlink
.
MaximumLength
=
(
strlenW
(
link_format
)
+
10
)
*
sizeof
(
WCHAR
);
if
((
symlink
.
Buffer
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
symlink
.
MaximumLength
)))
{
sprintfW
(
symlink
.
Buffer
,
link_format
,
i
);
symlink
.
Length
=
strlenW
(
symlink
.
Buffer
)
*
sizeof
(
WCHAR
);
if
(
!
IoCreateSymbolicLink
(
&
symlink
,
&
name
))
device
->
symlink
=
symlink
;
}
}
switch
(
type
)
{
case
DEVICE_FLOPPY
:
...
...
@@ -267,20 +284,9 @@ static NTSTATUS create_disk_device( enum device_type type, struct disk_device **
case
DEVICE_UNKNOWN
:
case
DEVICE_HARDDISK
:
case
DEVICE_NETWORK
:
/* FIXME */
{
UNICODE_STRING
symlink
;
symlink
.
MaximumLength
=
sizeof
(
physdriveW
)
+
10
*
sizeof
(
WCHAR
);
if
((
symlink
.
Buffer
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
symlink
.
MaximumLength
)))
{
sprintfW
(
symlink
.
Buffer
,
physdriveW
,
i
);
symlink
.
Length
=
strlenW
(
symlink
.
Buffer
)
*
sizeof
(
WCHAR
);
if
(
!
IoCreateSymbolicLink
(
&
symlink
,
&
name
))
device
->
symlink
=
symlink
;
}
device
->
devnum
.
DeviceType
=
FILE_DEVICE_DISK
;
device
->
devnum
.
DeviceNumber
=
i
;
device
->
devnum
.
PartitionNumber
=
0
;
}
device
->
devnum
.
DeviceType
=
FILE_DEVICE_DISK
;
device
->
devnum
.
DeviceNumber
=
i
;
device
->
devnum
.
PartitionNumber
=
0
;
break
;
case
DEVICE_HARDDISK_VOL
:
device
->
devnum
.
DeviceType
=
FILE_DEVICE_DISK
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment