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
134feaab
Commit
134feaab
authored
Jul 22, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mountmgr: Return a copy of the strings in query_dos_device.
parent
15acd35f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
9 deletions
+11
-9
device.c
dlls/mountmgr.sys/device.c
+3
-4
mountmgr.c
dlls/mountmgr.sys/mountmgr.c
+7
-3
mountmgr.h
dlls/mountmgr.sys/mountmgr.h
+1
-2
No files found.
dlls/mountmgr.sys/device.c
View file @
134feaab
...
...
@@ -807,8 +807,7 @@ NTSTATUS remove_dos_device( int letter, const char *udi )
}
/* query information about an existing dos drive, by letter or udi */
NTSTATUS
query_dos_device
(
int
letter
,
enum
device_type
*
type
,
const
char
**
device
,
const
char
**
mount_point
)
NTSTATUS
query_dos_device
(
int
letter
,
enum
device_type
*
type
,
char
**
device
,
char
**
mount_point
)
{
struct
dos_drive
*
drive
;
struct
disk_device
*
disk_device
;
...
...
@@ -818,8 +817,8 @@ NTSTATUS query_dos_device( int letter, enum device_type *type,
if
(
drive
->
drive
!=
letter
)
continue
;
disk_device
=
drive
->
volume
->
device
;
if
(
type
)
*
type
=
disk_device
->
type
;
if
(
device
)
*
device
=
disk_device
->
unix_device
;
if
(
mount_point
)
*
mount_point
=
disk_device
->
unix_mount
;
if
(
device
)
*
device
=
strdupA
(
disk_device
->
unix_device
)
;
if
(
mount_point
)
*
mount_point
=
strdupA
(
disk_device
->
unix_mount
)
;
return
STATUS_SUCCESS
;
}
return
STATUS_NO_SUCH_DEVICE
;
...
...
dlls/mountmgr.sys/mountmgr.c
View file @
134feaab
...
...
@@ -276,7 +276,7 @@ static NTSTATUS query_unix_drive( const void *in_buff, SIZE_T insize,
{
const
struct
mountmgr_unix_drive
*
input
=
in_buff
;
struct
mountmgr_unix_drive
*
output
=
out_buff
;
c
onst
c
har
*
device
,
*
mount_point
;
char
*
device
,
*
mount_point
;
int
letter
=
tolowerW
(
input
->
letter
);
NTSTATUS
status
;
DWORD
size
,
type
=
DEVICE_UNKNOWN
;
...
...
@@ -314,7 +314,8 @@ static NTSTATUS query_unix_drive( const void *in_buff, SIZE_T insize,
output
->
type
=
type
;
iosb
->
Information
=
FIELD_OFFSET
(
struct
mountmgr_unix_drive
,
type
)
+
sizeof
(
output
->
type
);
}
return
STATUS_MORE_ENTRIES
;
status
=
STATUS_MORE_ENTRIES
;
goto
done
;
}
output
->
size
=
size
;
output
->
letter
=
letter
;
...
...
@@ -341,7 +342,10 @@ static NTSTATUS query_unix_drive( const void *in_buff, SIZE_T insize,
letter
,
debugstr_a
(
device
),
debugstr_a
(
mount_point
),
type
);
iosb
->
Information
=
ptr
-
(
char
*
)
output
;
return
STATUS_SUCCESS
;
done:
RtlFreeHeap
(
GetProcessHeap
(),
0
,
device
);
RtlFreeHeap
(
GetProcessHeap
(),
0
,
mount_point
);
return
status
;
}
/* handler for ioctls on the mount manager device */
...
...
dlls/mountmgr.sys/mountmgr.h
View file @
134feaab
...
...
@@ -57,8 +57,7 @@ extern NTSTATUS remove_volume( const char *udi );
extern
NTSTATUS
add_dos_device
(
int
letter
,
const
char
*
udi
,
const
char
*
device
,
const
char
*
mount_point
,
enum
device_type
type
,
const
GUID
*
guid
);
extern
NTSTATUS
remove_dos_device
(
int
letter
,
const
char
*
udi
);
extern
NTSTATUS
query_dos_device
(
int
letter
,
enum
device_type
*
type
,
const
char
**
device
,
const
char
**
mount_point
);
extern
NTSTATUS
query_dos_device
(
int
letter
,
enum
device_type
*
type
,
char
**
device
,
char
**
mount_point
);
extern
NTSTATUS
WINAPI
harddisk_driver_entry
(
DRIVER_OBJECT
*
driver
,
UNICODE_STRING
*
path
);
/* mount point functions */
...
...
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