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
7a90e7a4
Commit
7a90e7a4
authored
Mar 09, 2011
by
André Hentschel
Committed by
Alexandre Julliard
Mar 10, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mountmgr.sys: Handle IOCTL_DISK_GET_DRIVE_GEOMETRY_EX.
parent
73f743f6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
device.c
dlls/mountmgr.sys/device.c
+20
-0
winioctl.h
include/winioctl.h
+7
-0
No files found.
dlls/mountmgr.sys/device.c
View file @
7a90e7a4
...
@@ -895,6 +895,26 @@ static NTSTATUS WINAPI harddisk_ioctl( DEVICE_OBJECT *device, IRP *irp )
...
@@ -895,6 +895,26 @@ static NTSTATUS WINAPI harddisk_ioctl( DEVICE_OBJECT *device, IRP *irp )
irp
->
IoStatus
.
u
.
Status
=
STATUS_SUCCESS
;
irp
->
IoStatus
.
u
.
Status
=
STATUS_SUCCESS
;
break
;
break
;
}
}
case
IOCTL_DISK_GET_DRIVE_GEOMETRY_EX
:
{
DISK_GEOMETRY_EX
info
;
DWORD
len
=
min
(
sizeof
(
info
),
irpsp
->
Parameters
.
DeviceIoControl
.
OutputBufferLength
);
FIXME
(
"The DISK_PARTITION_INFO and DISK_DETECTION_INFO structures will not be filled
\n
"
);
info
.
Geometry
.
Cylinders
.
QuadPart
=
10000
;
info
.
Geometry
.
MediaType
=
(
dev
->
devnum
.
DeviceType
==
FILE_DEVICE_DISK
)
?
FixedMedia
:
RemovableMedia
;
info
.
Geometry
.
TracksPerCylinder
=
255
;
info
.
Geometry
.
SectorsPerTrack
=
63
;
info
.
Geometry
.
BytesPerSector
=
512
;
info
.
DiskSize
.
QuadPart
=
info
.
Geometry
.
Cylinders
.
QuadPart
*
info
.
Geometry
.
TracksPerCylinder
*
info
.
Geometry
.
SectorsPerTrack
*
info
.
Geometry
.
BytesPerSector
;
info
.
Data
[
0
]
=
0
;
memcpy
(
irp
->
MdlAddress
->
StartVa
,
&
info
,
len
);
irp
->
IoStatus
.
Information
=
len
;
irp
->
IoStatus
.
u
.
Status
=
STATUS_SUCCESS
;
break
;
}
case
IOCTL_STORAGE_GET_DEVICE_NUMBER
:
case
IOCTL_STORAGE_GET_DEVICE_NUMBER
:
{
{
DWORD
len
=
min
(
sizeof
(
dev
->
devnum
),
irpsp
->
Parameters
.
DeviceIoControl
.
OutputBufferLength
);
DWORD
len
=
min
(
sizeof
(
dev
->
devnum
),
irpsp
->
Parameters
.
DeviceIoControl
.
OutputBufferLength
);
...
...
include/winioctl.h
View file @
7a90e7a4
...
@@ -264,6 +264,7 @@
...
@@ -264,6 +264,7 @@
#define SMART_GET_VERSION CTL_CODE(IOCTL_DISK_BASE, 0x0020, METHOD_BUFFERED, FILE_READ_ACCESS)
#define SMART_GET_VERSION CTL_CODE(IOCTL_DISK_BASE, 0x0020, METHOD_BUFFERED, FILE_READ_ACCESS)
#define SMART_SEND_DRIVE_COMMAND CTL_CODE(IOCTL_DISK_BASE, 0x0021, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define SMART_SEND_DRIVE_COMMAND CTL_CODE(IOCTL_DISK_BASE, 0x0021, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define SMART_RCV_DRIVE_DATA CTL_CODE(IOCTL_DISK_BASE, 0x0022, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define SMART_RCV_DRIVE_DATA CTL_CODE(IOCTL_DISK_BASE, 0x0022, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_DISK_GET_DRIVE_GEOMETRY_EX CTL_CODE(IOCTL_DISK_BASE, 0x0028, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VOLUME_BASE ((DWORD)'V')
#define IOCTL_VOLUME_BASE ((DWORD)'V')
#define IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS CTL_CODE(IOCTL_VOLUME_BASE, 0, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS CTL_CODE(IOCTL_VOLUME_BASE, 0, METHOD_BUFFERED, FILE_ANY_ACCESS)
...
@@ -325,6 +326,12 @@ typedef struct _DISK_GEOMETRY {
...
@@ -325,6 +326,12 @@ typedef struct _DISK_GEOMETRY {
DWORD
BytesPerSector
;
DWORD
BytesPerSector
;
}
DISK_GEOMETRY
,
*
PDISK_GEOMETRY
;
}
DISK_GEOMETRY
,
*
PDISK_GEOMETRY
;
typedef
struct
_DISK_GEOMETRY_EX
{
DISK_GEOMETRY
Geometry
;
LARGE_INTEGER
DiskSize
;
BYTE
Data
[
1
];
}
DISK_GEOMETRY_EX
,
*
PDISK_GEOMETRY_EX
;
typedef
struct
_PARTITION_INFORMATION
{
typedef
struct
_PARTITION_INFORMATION
{
LARGE_INTEGER
StartingOffset
;
LARGE_INTEGER
StartingOffset
;
LARGE_INTEGER
PartitionLength
;
LARGE_INTEGER
PartitionLength
;
...
...
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