mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-01 07:03:37 +00:00
mountmgr.sys: Handle IOCTL_DISK_GET_DRIVE_GEOMETRY_EX.
This commit is contained in:
parent
73f743f6d2
commit
7a90e7a444
|
@ -895,6 +895,26 @@ static NTSTATUS WINAPI harddisk_ioctl( DEVICE_OBJECT *device, IRP *irp )
|
|||
irp->IoStatus.u.Status = STATUS_SUCCESS;
|
||||
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:
|
||||
{
|
||||
DWORD len = min( sizeof(dev->devnum), irpsp->Parameters.DeviceIoControl.OutputBufferLength );
|
||||
|
|
|
@ -264,6 +264,7 @@
|
|||
#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_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_GET_VOLUME_DISK_EXTENTS CTL_CODE(IOCTL_VOLUME_BASE, 0, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
@ -325,6 +326,12 @@ typedef struct _DISK_GEOMETRY {
|
|||
DWORD BytesPerSector;
|
||||
} 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 {
|
||||
LARGE_INTEGER StartingOffset;
|
||||
LARGE_INTEGER PartitionLength;
|
||||
|
|
Loading…
Reference in a new issue