1795 if (irpStack->
Parameters.DeviceIoControl.OutputBufferLength <
1822 srbControl->
Timeout = deviceExtension->TimeOutValue;
1847 deviceExtension->PortDeviceObject,
1892 ULONG controlCode = 0;
1896 if (irpStack->
Parameters.DeviceIoControl.InputBufferLength <
1901 }
else if (irpStack->
Parameters.DeviceIoControl.OutputBufferLength <
1938 if (controlCode == 0) {
1957 srbControl->
Timeout = deviceExtension->TimeOutValue;
1971 cmdInParameters->
bDriveNumber = deviceExtension->TargetId;
1980 deviceExtension->PortDeviceObject,
2032 ULONG controlCode = 0;
2035 if (irpStack->
Parameters.DeviceIoControl.InputBufferLength <
2040 }
else if (irpStack->
Parameters.DeviceIoControl.OutputBufferLength <
2073 if (irpStack->
Parameters.DeviceIoControl.OutputBufferLength <
2105 if (controlCode == 0) {
2125 srbControl->
Timeout = deviceExtension->TimeOutValue;
2138 cmdInParameters->
bDriveNumber = deviceExtension->TargetId;
2149 deviceExtension->PortDeviceObject,
2233 physicalDeviceExtension = deviceExtension->PhysicalDevice->DeviceExtension;
2234 physicalDiskData = (
PDISK_DATA)(physicalDeviceExtension + 1);
2239 if (removable || (!listInitialized))
2285 deviceExtension->DiskGeometry,
2289 Irp->IoStatus.Information = copyLength;
2309 if (irpStack->
Parameters.DeviceIoControl.InputBufferLength <
2328 byteOffset.
QuadPart = deviceExtension->StartingOffset.QuadPart +
2335 sectorOffset = (
ULONG)(byteOffset.
QuadPart >> deviceExtension->SectorShift);
2363 deviceExtension->TimeOutValue;
2385 if (irpStack->
Parameters.DeviceIoControl.OutputBufferLength <
2474 if (irpStack->
Parameters.DeviceIoControl.OutputBufferLength <
2480 #if 0 // HACK: ReactOS partition numbers must be wrong 2497 DPRINT1(
"HACK: Handling partition 0 request!\n");
2569 if (irpStack->
Parameters.DeviceIoControl.InputBufferLength <
2586 deviceExtension->PhysicalDevice,
2587 deviceExtension->DiskGeometry->Geometry.BytesPerSector,
2607 if (irpStack->
Parameters.DeviceIoControl.OutputBufferLength <
2625 deviceExtension->DiskGeometry->Geometry.BytesPerSector,
2644 irpStack->
Parameters.DeviceIoControl.OutputBufferLength) {
2662 deviceExtension = physicalExtension;
2663 diskData = (
PDISK_DATA)(deviceExtension + 1);
2673 if (!deviceExtension) {
2681 diskData = (
PDISK_DATA)(deviceExtension + 1);
2687 if (!deviceExtension->PartitionLength.QuadPart) {
2707 deviceExtension->StartingOffset.QuadPart) {
2716 deviceExtension->PartitionLength.QuadPart) {
2738 Irp->IoStatus.Information = tempSize;
2764 if (irpStack->
Parameters.DeviceIoControl.InputBufferLength <
2775 if (irpStack->
Parameters.DeviceIoControl.InputBufferLength <
2786 if (deviceExtension->PhysicalDevice->DeviceExtension != deviceExtension) {
2805 deviceExtension->DeviceObject,
2806 deviceExtension->DiskGeometry->Geometry.BytesPerSector,
2807 deviceExtension->DiskGeometry->Geometry.SectorsPerTrack,
2808 deviceExtension->DiskGeometry->Geometry.TracksPerCylinder,
2839 if (irpStack->
Parameters.DeviceIoControl.InputBufferLength <
2849 if (irpStack->
Parameters.DeviceIoControl.InputBufferLength <
2868 blockCount = badBlocks->
Count;
2875 badBlocks->
Count = (
USHORT) ((blockCount >> 8) & 0XFF);
2876 badBlocks->
Count |= (
USHORT) ((blockCount << 8) & 0XFF00);
2884 for (; blockCount > 0; blockCount--) {
2886 blockNumber = badBlocks->
BlockNumber[blockCount-1];
2909 Irp->IoStatus.Information = 0;
2924 if (modeData ==
NULL) {
2994 DebugPrint((3,
"CdRomDeviceControl: Find devices\n"));
3024 if (irpStack->
Parameters.DeviceIoControl.OutputBufferLength <
3058 lengthInformation->
Length.
QuadPart = deviceExtension->PartitionLength.QuadPart;
#define IOCTL_DISK_GET_DRIVE_GEOMETRY_EX
NTSTATUS NTAPI CreatePartitionDeviceObjects(IN PDEVICE_OBJECT PhysicalDeviceObject, IN PUNICODE_STRING RegistryPath)
#define SCSIOP_REASSIGN_BLOCKS
struct _DISK_DATA * PDISK_DATA
#define STATUS_INSUFFICIENT_RESOURCES
#define IOCTL_SCSI_MINIPORT_READ_SMART_ATTRIBS
#define STATUS_INFO_LENGTH_MISMATCH
#define IOCTL_DISK_INTERNAL_SET_VERIFY
#define IOCTL_SCSI_MINIPORT
#define STATUS_INVALID_PARAMETER
#define MODE_DSP_WRITE_PROTECT
#define SMART_GET_VERSION
NTSTATUS FASTCALL IoReadPartitionTable(IN PDEVICE_OBJECT DeviceObject, IN ULONG SectorSize, IN BOOLEAN ReturnRecognizedPartitions, OUT PDRIVE_LAYOUT_INFORMATION *PartitionBuffer)
#define ENABLE_DISABLE_AUTOSAVE
#define IoIsErrorUserInduced(Status)
#define REVERSE_BYTES(Destination, Source)
#define MODE_SENSE_RETURN_ALL
#define STATUS_INVALID_DEVICE_REQUEST
struct _SENDCMDOUTPARAMS SENDCMDOUTPARAMS
#define IOCTL_DISK_IS_WRITABLE
#define IDENTIFY_BUFFER_SIZE
#define IsContainerPartition(PartitionType)
struct _CDB::_CDB10 CDB10
struct _PARTITION_INFORMATION PARTITION_INFORMATION
NTSTATUS NTAPI KeWaitForSingleObject(IN PVOID Object, IN KWAIT_REASON WaitReason, IN KPROCESSOR_MODE WaitMode, IN BOOLEAN Alertable, IN PLARGE_INTEGER Timeout OPTIONAL)
#define RtlMoveMemory(Destination, Source, Length)
#define STATUS_BUFFER_TOO_SMALL
#define IOCTL_DISK_FIND_NEW_DEVICES
PDEVICE_EXTENSION NextPartition
#define STATUS_IO_DEVICE_ERROR
#define PARTITION_ENTRY_UNUSED
struct _SENDCMDINPARAMS SENDCMDINPARAMS
_In_ PDEVICE_OBJECT DeviceObject
struct _PARTITION_INFORMATION_EX PARTITION_INFORMATION_EX
#define IO_DISK_INCREMENT
#define IOCTL_SCSI_MINIPORT_ENABLE_DISABLE_AUTOSAVE
#define IOCTL_DISK_VERIFY
#define FILE_REMOVABLE_MEDIA
struct _DRIVE_LAYOUT_INFORMATION DRIVE_LAYOUT_INFORMATION
GLenum GLuint GLenum GLsizei length
struct _GET_LENGTH_INFORMATION GET_LENGTH_INFORMATION
NTSTATUS ScsiClassReadDriveCapacity(IN PDEVICE_OBJECT DeviceObject)
VOID NTAPI UpdateDeviceObjects(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
#define IOCTL_SCSI_MINIPORT_READ_SMART_THRESHOLDS
struct _REASSIGN_BLOCKS REASSIGN_BLOCKS
#define IoCompleteRequest
#define STATUS_MEDIA_WRITE_PROTECTED
#define READ_THRESHOLD_BUFFER_SIZE
struct _DISK_GEOMETRY_EX DISK_GEOMETRY_EX
#define RETURN_SMART_STATUS
#define READ_ATTRIBUTE_BUFFER_SIZE
#define IOCTL_DISK_SET_PARTITION_INFO
#define SMART_RCV_DRIVE_DATA
#define EXECUTE_OFFLINE_DIAGS
#define IOCTL_DISK_GET_LENGTH_INFO
#define SAVE_ATTRIBUTE_VALUES
ULONG NTAPI ScsiClassModeSense(IN PDEVICE_OBJECT DeviceObject, IN PCHAR ModeSenseBuffer, IN ULONG Length, IN UCHAR PageMode)
#define NT_SUCCESS(StatCode)
#define IOCTL_DISK_INTERNAL_CLEAR_VERIFY
#define IOCTL_SCSI_MINIPORT_EXECUTE_OFFLINE_DIAGS
#define IOCTL_SCSI_MINIPORT_RETURN_STATUS
#define IsRecognizedPartition(PartitionType)
#define IOCTL_SCSI_MINIPORT_ENABLE_SMART
#define STATUS_UNSUCCESSFUL
#define IOCTL_SCSI_MINIPORT_SAVE_ATTRIBUTE_VALUES
#define IOCTL_DISK_GET_PARTITION_INFO
#define ExAllocatePool(type, size)
NTSTATUS NTAPI DriverEntry(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath)
NTSTATUS ScsiClassSendSrbSynchronous(IN PDEVICE_OBJECT TargetDeviceObject, IN PSCSI_REQUEST_BLOCK _srb, IN PKEVENT event)
struct _GETVERSIONINPARAMS GETVERSIONINPARAMS
#define IOCTL_DISK_REASSIGN_BLOCKS
ULONG NTAPI DebugPrint(IN PSTRING DebugString, IN ULONG ComponentId, IN ULONG Level)
#define IOCTL_DISK_GET_DRIVE_LAYOUT
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(_In_ PIRP Irp)
struct _DISK_GEOMETRY DISK_GEOMETRY
struct _PARTITION_INFORMATION * PPARTITION_INFORMATION
PARTITION_LIST_STATE PartitionListState
NTSTATUS NTAPI ScsiClassSendSrbAsynchronous(PDEVICE_OBJECT DeviceObject, PSCSI_REQUEST_BLOCK Srb, PIRP Irp, PVOID BufferAddress, ULONG BufferLength, BOOLEAN WriteToDevice)
#define KeInitializeEvent(pEvt, foo, foo2)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
struct _SRB_IO_CONTROL SRB_IO_CONTROL
struct _CDB::_CDB6GENERIC CDB6GENERIC
#define IOCTL_SCSI_MINIPORT_IDENTIFY
#define FIELD_OFFSET(t, f)
#define SCSI_REQUEST_BLOCK_SIZE
NTSTATUS NTAPI IoCallDriver(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
#define IOCTL_SCSI_MINIPORT_SMART_VERSION
PIRP NTAPI IoBuildDeviceIoControlRequest(IN ULONG IoControlCode, IN PDEVICE_OBJECT DeviceObject, IN PVOID InputBuffer, IN ULONG InputBufferLength, IN PVOID OutputBuffer, IN ULONG OutputBufferLength, IN BOOLEAN InternalDeviceIoControl, IN PKEVENT Event, IN PIO_STATUS_BLOCK IoStatusBlock)
NTSTATUS FASTCALL IoSetPartitionInformation(IN PDEVICE_OBJECT DeviceObject, IN ULONG SectorSize, IN ULONG PartitionNumber, IN ULONG PartitionType)
#define RtlZeroMemory(Destination, Length)
NTSTATUS NTAPI ScsiClassDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp)
#define IOCTL_DISK_SET_DRIVE_LAYOUT
VOID NTAPI IoSetHardErrorOrVerifyDevice(IN PIRP Irp, IN PDEVICE_OBJECT DeviceObject)
NTSTATUS FASTCALL IoWritePartitionTable(IN PDEVICE_OBJECT DeviceObject, IN ULONG SectorSize, IN ULONG SectorsPerTrack, IN ULONG NumberOfHeads, IN PDRIVE_LAYOUT_INFORMATION PartitionBuffer)
#define IOCTL_DISK_MEDIA_REMOVAL
#define IOCTL_SCSI_MINIPORT_DISABLE_SMART
struct _NAMED_PIPE_CREATE_PARAMETERS * Parameters
static SERVICE_STATUS status
#define SMART_SEND_DRIVE_COMMAND
#define IOCTL_DISK_GET_DRIVE_GEOMETRY
struct _PARTITION_INFORMATION_EX * PPARTITION_INFORMATION_EX
struct _SET_PARTITION_INFORMATION * PSET_PARTITION_INFORMATION
#define IOCTL_DISK_GET_PARTITION_INFO_EX
NTSTATUS NTAPI UpdateRemovableGeometry(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
struct _SENDCMDINPARAMS * PSENDCMDINPARAMS