Author: akhaldi
Date: Tue Sep 25 20:59:32 2012
New Revision: 57385
URL:
http://svn.reactos.org/svn/reactos?rev=57385&view=rev
Log:
[CDROM_NEW]
* Explicitly mark the functions as stdcall.
* Fix warnings.
Modified:
trunk/reactos/drivers/storage/class/cdrom_new/CMakeLists.txt
trunk/reactos/drivers/storage/class/cdrom_new/cdrom.c
trunk/reactos/drivers/storage/class/cdrom_new/cdrom.h
trunk/reactos/drivers/storage/class/cdrom_new/ioctl.c
trunk/reactos/drivers/storage/class/cdrom_new/mmc.c
trunk/reactos/drivers/storage/class/cdrom_new/sec.c
trunk/reactos/drivers/storage/class/cdrom_new/sec.h
Modified: trunk/reactos/drivers/storage/class/cdrom_new/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/class/cdro…
==============================================================================
--- trunk/reactos/drivers/storage/class/cdrom_new/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/drivers/storage/class/cdrom_new/CMakeLists.txt [iso-8859-1] Tue Sep 25
20:59:32 2012
@@ -13,12 +13,9 @@
if(ARCH STREQUAL "i386")
# FIXME:
http://www.cmake.org/Bug/view.php?id=12998
- if(MSVC)
- #add_target_compile_flags(cdrom_new "/Gz")
- set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "/Gz")
- else()
- #add_target_compile_flags(cdrom_new "-mrtd -fno-builtin -Wno-unused-variable
-Wno-pointer-sign")
- set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-mrtd
-fno-builtin -Wno-unused-variable -Wno-pointer-sign")
+ if(NOT MSVC)
+ #add_target_compile_flags(cdrom_new "-Wno-format -Wno-unused-variable
-Wno-pointer-sign")
+ set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-Wno-format
-Wno-unused-variable -Wno-pointer-sign")
endif()
endif()
Modified: trunk/reactos/drivers/storage/class/cdrom_new/cdrom.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/class/cdro…
==============================================================================
--- trunk/reactos/drivers/storage/class/cdrom_new/cdrom.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/storage/class/cdrom_new/cdrom.c [iso-8859-1] Tue Sep 25 20:59:32
2012
@@ -72,8 +72,6 @@
(irpStack->Parameters.DeviceIoControl.IoControlCode == IOCTL_CDROM_RAW_READ)))
-
-
NTSTATUS
NTAPI
DriverEntry(
@@ -175,9 +173,9 @@
return ClassInitialize( DriverObject, RegistryPath, &InitializationData);
} // end DriverEntry()
-
VOID
+NTAPI
CdRomUnload(
IN PDRIVER_OBJECT DriverObject
)
@@ -189,9 +187,9 @@
WPP_CLEANUP(DriverObject);
return;
} // end CdRomUnload()
-
NTSTATUS
+NTAPI
CdRomAddDevice(
IN PDRIVER_OBJECT DriverObject,
IN PDEVICE_OBJECT PhysicalDeviceObject
@@ -259,9 +257,9 @@
return status;
}
-
NTSTATUS
+NTAPI
CdRomCreateDeviceObject(
IN PDRIVER_OBJECT DriverObject,
IN PDEVICE_OBJECT PhysicalDeviceObject
@@ -290,7 +288,7 @@
--*/
{
UCHAR ntNameBuffer[64];
- STRING ntNameString;
+ //STRING ntNameString;
NTSTATUS status;
PDEVICE_OBJECT lowerDevice = NULL;
@@ -300,12 +298,12 @@
PCDROM_DRIVER_EXTENSION driverExtension = NULL;
ULONG deviceNumber;
- CCHAR dosNameBuffer[64];
- CCHAR deviceNameBuffer[64];
- STRING deviceNameString;
- STRING dosString;
- UNICODE_STRING dosUnicodeString;
- UNICODE_STRING unicodeString;
+ //CCHAR dosNameBuffer[64];
+ //CCHAR deviceNameBuffer[64];
+ //STRING deviceNameString;
+ //STRING dosString;
+ //UNICODE_STRING dosUnicodeString;
+ //UNICODE_STRING unicodeString;
PAGED_CODE();
@@ -518,9 +516,9 @@
return status;
} // end CreateCdRomDeviceObject()
-
NTSTATUS
+NTAPI
CdRomInitDevice(
IN PDEVICE_OBJECT Fdo
)
@@ -557,7 +555,7 @@
ULONG timeOut;
PCDROM_DATA cddata = NULL;
- BOOLEAN changerDevice;
+ //BOOLEAN changerDevice;
BOOLEAN isMmcDevice = FALSE;
ULONG bps;
@@ -1173,9 +1171,9 @@
return status;
}
-
NTSTATUS
+NTAPI
CdRomStartDevice(
IN PDEVICE_OBJECT Fdo
)
@@ -1321,9 +1319,9 @@
return STATUS_SUCCESS;
}
-
NTSTATUS
+NTAPI
CdRomStopDevice(
IN PDEVICE_OBJECT DeviceObject,
IN UCHAR Type
@@ -1331,9 +1329,9 @@
{
return STATUS_SUCCESS;
}
-
VOID
+NTAPI
CdRomStartIo(
IN PDEVICE_OBJECT Fdo,
IN PIRP Irp
@@ -1351,7 +1349,7 @@
ULONG transferPages;
ULONG transferByteCount = currentIrpStack->Parameters.Read.Length;
- LARGE_INTEGER startingOffset = currentIrpStack->Parameters.Read.ByteOffset;
+ //LARGE_INTEGER startingOffset =
currentIrpStack->Parameters.Read.ByteOffset;
PCDROM_DATA cdData;
PSCSI_REQUEST_BLOCK srb = NULL;
PCDB cdb;
@@ -1942,7 +1940,7 @@
if (cdData->RawAccess) {
ULONG startingSector;
- UCHAR min, sec, frame;
+ //UCHAR min, sec, frame;
//
// Free the recently allocated irp, as we don't need it.
@@ -2962,7 +2960,7 @@
case IOCTL_CDROM_GET_CONTROL: {
- PAUDIO_OUTPUT audioOutput;
+ //PAUDIO_OUTPUT audioOutput;
PCDROM_AUDIO_CONTROL audioControl = Irp->AssociatedIrp.SystemBuffer;
//
@@ -3295,9 +3293,9 @@
IoCallDriver(commonExtension->LowerDeviceObject, Irp);
return;
}
-
NTSTATUS
+NTAPI
CdRomReadWriteVerification(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp
@@ -3333,7 +3331,7 @@
SCSI_REQUEST_BLOCK srb;
PCDB cdb = (PCDB)srb.Cdb;
- NTSTATUS status;
+ //NTSTATUS status;
PAGED_CODE();
@@ -3381,9 +3379,9 @@
return STATUS_SUCCESS;
} // end CdRomReadWriteVerification()
-
NTSTATUS
+NTAPI
CdRomSwitchModeCompletion(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
@@ -3552,7 +3550,7 @@
ULONG maximumTransferLength;
ULONG transferPages;
- UCHAR min, sec, frame;
+ //UCHAR min, sec, frame;
//
// Calculate starting offset.
@@ -3828,9 +3826,9 @@
return STATUS_MORE_PROCESSING_REQUIRED;
}
-
VOID
+NTAPI
ScanForSpecialHandler(
PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
ULONG_PTR HackFlags
@@ -3851,6 +3849,7 @@
}
VOID
+NTAPI
ScanForSpecial(
PDEVICE_OBJECT DeviceObject
)
@@ -4187,9 +4186,9 @@
return;
}
-
VOID
+NTAPI
HitachiProcessErrorGD2000(
PDEVICE_OBJECT Fdo,
PSCSI_REQUEST_BLOCK OriginalSrb,
@@ -4234,12 +4233,12 @@
if (((senseBuffer->SenseKey & 0xf) == SCSI_SENSE_HARDWARE_ERROR) &&
(senseBuffer->AdditionalSenseCode == 0x44)) {
- PFUNCTIONAL_DEVICE_EXTENSION fdoExtension;
- PIRP irp;
- PIO_STACK_LOCATION irpStack;
- PCOMPLETION_CONTEXT context;
- PSCSI_REQUEST_BLOCK newSrb;
- PCDB cdb;
+ //PFUNCTIONAL_DEVICE_EXTENSION fdoExtension;
+ //PIRP irp;
+ //PIO_STACK_LOCATION irpStack;
+ //PCOMPLETION_CONTEXT context;
+ //PSCSI_REQUEST_BLOCK newSrb;
+ //PCDB cdb;
TraceLog((CdromDebugWarning,
"HitachiProcessErrorGD2000 (%p) => Internal Target "
@@ -4266,9 +4265,9 @@
return;
}
-
VOID
+NTAPI
HitachiProcessError(
PDEVICE_OBJECT DeviceObject,
PSCSI_REQUEST_BLOCK Srb,
@@ -4479,9 +4478,9 @@
}
}
-
NTSTATUS
+NTAPI
ToshibaProcessErrorCompletion(
PDEVICE_OBJECT DeviceObject,
PIRP Irp,
@@ -4531,9 +4530,9 @@
return STATUS_MORE_PROCESSING_REQUIRED;
}
-
VOID
+NTAPI
ToshibaProcessError(
PDEVICE_OBJECT DeviceObject,
PSCSI_REQUEST_BLOCK Srb,
@@ -4713,9 +4712,9 @@
IoCallDriver(fdoExtension->CommonExtension.LowerDeviceObject, irp);
}
}
-
BOOLEAN
+NTAPI
CdRomIsPlayActive(
IN PDEVICE_OBJECT DeviceObject
)
@@ -4795,9 +4794,9 @@
return(PLAY_ACTIVE(fdoExtension));
}
-
VOID
+NTAPI
CdRomTickHandler(
IN PDEVICE_OBJECT DeviceObject
)
@@ -4827,12 +4826,12 @@
KIRQL oldIrql;
- PIRP irp;
- PIRP heldIrpList;
- PIRP nextIrp;
- PLIST_ENTRY listEntry;
+ //PIRP irp;
+ //PIRP heldIrpList;
+ //PIRP nextIrp;
+ //PLIST_ENTRY listEntry;
PCDROM_DATA cddata;
- PIO_STACK_LOCATION irpStack;
+ //PIO_STACK_LOCATION irpStack;
UCHAR uniqueAddress;
isRemoved = ClassAcquireRemoveLock(DeviceObject, (PIRP) &uniqueAddress);
@@ -4915,9 +4914,9 @@
ClassReleaseRemoveLock(DeviceObject, (PIRP) &uniqueAddress);
}
-
NTSTATUS
+NTAPI
CdRomUpdateGeometryCompletion(
PDEVICE_OBJECT DeviceObject,
PIRP Irp,
@@ -4955,10 +4954,10 @@
NTSTATUS status;
BOOLEAN retry;
ULONG retryCount;
- ULONG lastSector;
+ //ULONG lastSector;
PIRP originalIrp;
- PCDROM_DATA cddata;
- UCHAR uniqueAddress;
+ //PCDROM_DATA cddata;
+ //UCHAR uniqueAddress;
//
// Get items saved in the private IRP stack location.
@@ -4975,7 +4974,7 @@
fdoExtension = DeviceObject->DeviceExtension;
commonExtension = DeviceObject->DeviceExtension;
- cddata = commonExtension->DriverData;
+ //cddata = commonExtension->DriverData;
readCapacityBuffer = srb->DataBuffer;
if ((NT_SUCCESS(Irp->IoStatus.Status)) && (SRB_STATUS(srb->SrbStatus)
== SRB_STATUS_SUCCESS)) {
@@ -5155,9 +5154,9 @@
return STATUS_MORE_PROCESSING_REQUIRED;
}
-
NTSTATUS
+NTAPI
CdRomUpdateCapacity(
IN PFUNCTIONAL_DEVICE_EXTENSION DeviceExtension,
IN PIRP IrpToComplete,
@@ -5194,7 +5193,7 @@
PREAD_CAPACITY_DATA capacityBuffer;
PIO_STACK_LOCATION irpStack;
PUCHAR senseBuffer;
- NTSTATUS status;
+ //NTSTATUS status;
irp = IoAllocateIrp((CCHAR)(commonExtension->DeviceObject->StackSize+1),
FALSE);
@@ -5353,9 +5352,9 @@
IrpToComplete);
return STATUS_INSUFFICIENT_RESOURCES;
}
-
NTSTATUS
+NTAPI
CdRomRemoveDevice(
IN PDEVICE_OBJECT DeviceObject,
IN UCHAR Type
@@ -5494,9 +5493,9 @@
return STATUS_SUCCESS;
}
-
DEVICE_TYPE
+NTAPI
CdRomGetDeviceType(
IN PDEVICE_OBJECT DeviceObject
)
@@ -5621,9 +5620,9 @@
return deviceType;
}
-
NTSTATUS
+NTAPI
CdRomCreateWellKnownName(
IN PDEVICE_OBJECT DeviceObject
)
@@ -5733,9 +5732,9 @@
return STATUS_SUCCESS;
}
-
VOID
+NTAPI
CdRomDeleteWellKnownName(
IN PDEVICE_OBJECT DeviceObject
)
@@ -5754,9 +5753,9 @@
}
return;
}
-
NTSTATUS
+NTAPI
CdRomGetDeviceParameter (
IN PDEVICE_OBJECT Fdo,
IN PWSTR ParameterName,
@@ -5830,9 +5829,9 @@
return status;
} // CdRomGetDeviceParameter
-
NTSTATUS
+NTAPI
CdRomSetDeviceParameter (
IN PDEVICE_OBJECT Fdo,
IN PWSTR ParameterName,
@@ -5891,9 +5890,9 @@
return status;
} // CdromSetDeviceParameter
-
VOID
+NTAPI
CdRomPickDvdRegion(
IN PDEVICE_OBJECT Fdo
)
@@ -6372,9 +6371,9 @@
return;
}
-
NTSTATUS
+NTAPI
CdRomRetryRequest(
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
IN PIRP Irp,
@@ -6404,9 +6403,9 @@
return STATUS_PENDING;
}
-
NTSTATUS
+NTAPI
CdRomRerunRequest(
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
IN OPTIONAL PIRP Irp,
@@ -6425,7 +6424,6 @@
return STATUS_MORE_PROCESSING_REQUIRED;
}
}
-
/*++
@@ -6625,6 +6623,7 @@
--*/
VOID
+NTAPI
CdRomErrorHandler(
PDEVICE_OBJECT DeviceObject,
PSCSI_REQUEST_BLOCK Srb,
@@ -6704,7 +6703,6 @@
}
return;
}
-
/*++
@@ -6726,6 +6724,7 @@
--*/
NTSTATUS
+NTAPI
CdRomShutdownFlush(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp
@@ -7007,8 +7006,8 @@
} // end CdromShutdownFlush()
-
VOID
+NTAPI
CdromFakePartitionInfo(
IN PCOMMON_DEVICE_EXTENSION CommonExtension,
IN PIRP Irp
@@ -7144,5 +7143,3 @@
return;
}
-
-
Modified: trunk/reactos/drivers/storage/class/cdrom_new/cdrom.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/class/cdro…
==============================================================================
--- trunk/reactos/drivers/storage/class/cdrom_new/cdrom.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/storage/class/cdrom_new/cdrom.h [iso-8859-1] Tue Sep 25 20:59:32
2012
@@ -355,8 +355,6 @@
#define DVD_MAX_REGION_RESET_COUNT 2
#define DVD_MAX_REGION 8
-
-
#define BAIL_OUT(Irp) \
DebugPrint((2, "Cdrom: [%p] Bailing with status " \
" %lx at line %x file %s\n", \
@@ -437,8 +435,9 @@
return;
}
-
-VOID
+
+VOID
+NTAPI
CdRomDeviceControlDvdReadStructure(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP OriginalIrp,
@@ -447,6 +446,7 @@
);
VOID
+NTAPI
CdRomDeviceControlDvdEndSession(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP OriginalIrp,
@@ -455,6 +455,7 @@
);
VOID
+NTAPI
CdRomDeviceControlDvdStartSessionReadKey(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP OriginalIrp,
@@ -463,45 +464,50 @@
);
VOID
+NTAPI
CdRomDeviceControlDvdSendKey(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP OriginalIrp,
IN PIRP NewIrp,
IN PSCSI_REQUEST_BLOCK Srb
);
-
-
-
-NTSTATUS
+
+NTSTATUS
+NTAPI
DriverEntry(
IN PDRIVER_OBJECT DriverObject,
IN PUNICODE_STRING RegistryPath
);
VOID
+NTAPI
CdRomUnload(
IN PDRIVER_OBJECT DriverObject
);
NTSTATUS
+NTAPI
CdRomAddDevice(
IN PDRIVER_OBJECT DriverObject,
IN PDEVICE_OBJECT Pdo
);
NTSTATUS
+NTAPI
CdRomOpenClose(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp
);
NTSTATUS
+NTAPI
CdRomReadWriteVerification(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp
);
NTSTATUS
+NTAPI
CdRomSwitchMode(
IN PDEVICE_OBJECT DeviceObject,
IN ULONG SectorSize,
@@ -509,12 +515,14 @@
);
NTSTATUS
+NTAPI
CdRomDeviceControlDispatch(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp
);
NTSTATUS
+NTAPI
CdRomDeviceControlCompletion(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
@@ -522,6 +530,7 @@
);
NTSTATUS
+NTAPI
CdRomSetVolumeIntermediateCompletion(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
@@ -529,6 +538,7 @@
);
NTSTATUS
+NTAPI
CdRomSwitchModeCompletion(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
@@ -536,6 +546,7 @@
);
NTSTATUS
+NTAPI
CdRomXACompletion(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
@@ -543,6 +554,7 @@
);
NTSTATUS
+NTAPI
CdRomClassIoctlCompletion(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
@@ -550,17 +562,20 @@
);
VOID
+NTAPI
CdRomStartIo(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp
);
VOID
+NTAPI
CdRomTickHandler(
IN PDEVICE_OBJECT DeviceObject
);
NTSTATUS
+NTAPI
CdRomUpdateCapacity(
IN PFUNCTIONAL_DEVICE_EXTENSION DeviceExtension,
IN PIRP IrpToComplete,
@@ -568,28 +583,33 @@
);
NTSTATUS
+NTAPI
CdRomCreateDeviceObject(
IN PDRIVER_OBJECT DriverObject,
IN PDEVICE_OBJECT Pdo
);
VOID
+NTAPI
ScanForSpecialHandler(
PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
ULONG_PTR HackFlags
);
VOID
+NTAPI
ScanForSpecial(
PDEVICE_OBJECT DeviceObject
);
BOOLEAN
+NTAPI
CdRomIsPlayActive(
IN PDEVICE_OBJECT DeviceObject
);
VOID
+NTAPI
CdRomErrorHandler(
PDEVICE_OBJECT DeviceObject,
PSCSI_REQUEST_BLOCK Srb,
@@ -598,6 +618,7 @@
);
VOID
+NTAPI
HitachiProcessErrorGD2000(
PDEVICE_OBJECT DeviceObject,
PSCSI_REQUEST_BLOCK Srb,
@@ -606,6 +627,7 @@
);
VOID
+NTAPI
HitachiProcessError(
PDEVICE_OBJECT DeviceObject,
PSCSI_REQUEST_BLOCK Srb,
@@ -614,6 +636,7 @@
);
VOID
+NTAPI
ToshibaProcessError(
PDEVICE_OBJECT DeviceObject,
PSCSI_REQUEST_BLOCK Srb,
@@ -622,6 +645,7 @@
);
NTSTATUS
+NTAPI
ToshibaProcessErrorCompletion(
PDEVICE_OBJECT DeviceObject,
PIRP Irp,
@@ -629,34 +653,40 @@
);
VOID
+NTAPI
CdRomCreateNamedEvent(
IN PFUNCTIONAL_DEVICE_EXTENSION DeviceExtension,
IN ULONG DeviceNumber
);
NTSTATUS
+NTAPI
CdRomInitDevice(
IN PDEVICE_OBJECT Fdo
);
NTSTATUS
+NTAPI
CdRomStartDevice(
IN PDEVICE_OBJECT Fdo
);
NTSTATUS
+NTAPI
CdRomStopDevice(
IN PDEVICE_OBJECT DeviceObject,
IN UCHAR Type
);
NTSTATUS
+NTAPI
CdRomRemoveDevice(
IN PDEVICE_OBJECT DeviceObject,
IN UCHAR Type
);
NTSTATUS
+NTAPI
CdRomDvdEndAllSessionsCompletion(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
@@ -664,6 +694,7 @@
);
NTSTATUS
+NTAPI
CdRomDvdReadDiskKeyCompletion(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
@@ -671,21 +702,25 @@
);
DEVICE_TYPE
+NTAPI
CdRomGetDeviceType(
IN PDEVICE_OBJECT DeviceObject
);
NTSTATUS
+NTAPI
CdRomCreateWellKnownName(
IN PDEVICE_OBJECT DeviceObject
);
VOID
+NTAPI
CdRomDeleteWellKnownName(
IN PDEVICE_OBJECT DeviceObject
);
NTSTATUS
+NTAPI
CdRomGetDeviceParameter (
IN PDEVICE_OBJECT DeviceObject,
IN PWSTR ParameterName,
@@ -693,6 +728,7 @@
);
NTSTATUS
+NTAPI
CdRomSetDeviceParameter (
IN PDEVICE_OBJECT DeviceObject,
IN PWSTR ParameterName,
@@ -700,11 +736,13 @@
);
VOID
+NTAPI
CdRomPickDvdRegion (
IN PDEVICE_OBJECT Fdo
);
NTSTATUS
+NTAPI
CdRomRetryRequest(
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
IN PIRP Irp,
@@ -713,6 +751,7 @@
);
NTSTATUS
+NTAPI
CdRomRerunRequest(
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
IN OPTIONAL PIRP Irp,
@@ -720,17 +759,20 @@
);
NTSTATUS
+NTAPI
CdRomGetRpc0Settings(
IN PDEVICE_OBJECT Fdo
);
NTSTATUS
+NTAPI
CdRomSetRpc0Settings(
IN PDEVICE_OBJECT Fdo,
IN UCHAR NewRegion
);
NTSTATUS
+NTAPI
CdRomShutdownFlush(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp
@@ -739,6 +781,7 @@
////////////////////////////////////////////////////////////////////////////////
VOID
+NTAPI
CdRomIsDeviceMmcDevice(
IN PDEVICE_OBJECT Fdo,
OUT PBOOLEAN IsMmc
@@ -754,6 +797,7 @@
);
PVOID
+NTAPI
CdRomFindFeaturePage(
IN PGET_CONFIGURATION_HEADER FeatureBuffer,
IN ULONG Length,
@@ -761,6 +805,7 @@
);
NTSTATUS
+NTAPI
CdRomGetConfiguration(
IN PDEVICE_OBJECT Fdo,
OUT PGET_CONFIGURATION_HEADER *Buffer,
@@ -770,12 +815,14 @@
);
VOID
+NTAPI
CdRomUpdateMmcDriveCapabilities(
IN PDEVICE_OBJECT Fdo,
IN PVOID Context // RESERVED == NULL
);
VOID
+NTAPI
CdRomFindProfileInProfiles(
IN PFEATURE_DATA_PROFILE_LIST ProfileHeader,
IN FEATURE_PROFILE_TYPE ProfileToFind,
@@ -783,28 +830,33 @@
);
NTSTATUS
+NTAPI
CdRomAllocateMmcResources(
IN PDEVICE_OBJECT Fdo
);
VOID
+NTAPI
CdRomDeAllocateMmcResources(
IN PDEVICE_OBJECT Fdo
);
VOID
+NTAPI
CdromFakePartitionInfo(
IN PCOMMON_DEVICE_EXTENSION CommonExtension,
IN PIRP Irp
);
VOID
+NTAPI
CdRomInterpretReadCapacity(
IN PDEVICE_OBJECT Fdo,
IN PREAD_CAPACITY_DATA ReadCapacityBuffer
);
NTSTATUS
+NTAPI
CdRomShutdownFlushCompletion(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
@@ -812,6 +864,7 @@
);
VOID
+NTAPI
CdRompFlushDelayedList(
IN PDEVICE_OBJECT Fdo,
IN PCDROM_MMC_EXTENSION MmcData,
@@ -820,5 +873,3 @@
);
#endif // __CDROMP_H__
-
-
Modified: trunk/reactos/drivers/storage/class/cdrom_new/ioctl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/class/cdro…
==============================================================================
--- trunk/reactos/drivers/storage/class/cdrom_new/ioctl.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/storage/class/cdrom_new/ioctl.c [iso-8859-1] Tue Sep 25 20:59:32
2012
@@ -51,9 +51,8 @@
#define DEFAULT_CDROM_SECTORS_PER_TRACK 32
#define DEFAULT_TRACKS_PER_CYLINDER 64
-
-
NTSTATUS
+NTAPI
CdRomDeviceControlDispatch(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp
@@ -86,10 +85,10 @@
BOOLEAN use6Byte = TEST_FLAG(cdData->XAFlags, XA_USE_6_BYTE);
SCSI_REQUEST_BLOCK srb;
PCDB cdb = (PCDB)srb.Cdb;
- PVOID outputBuffer;
+ //PVOID outputBuffer;
ULONG bytesTransferred = 0;
NTSTATUS status;
- NTSTATUS status2;
+ //NTSTATUS status2;
KIRQL irql;
ULONG ioctlCode;
@@ -274,7 +273,7 @@
ULONGLONG transferBytes;
ULONGLONG endOffset;
ULONGLONG mdlBytes;
- ULONG startingSector;
+ //ULONG startingSector;
PRAW_READ_INFO rawReadInfo =
(PRAW_READ_INFO)irpStack->Parameters.DeviceIoControl.Type3InputBuffer;
//
@@ -344,8 +343,8 @@
}
startingOffset.QuadPart = rawReadInfo->DiskOffset.QuadPart;
- startingSector = (ULONG)(rawReadInfo->DiskOffset.QuadPart >>
- fdoExtension->SectorShift);
+ /* startingSector = (ULONG)(rawReadInfo->DiskOffset.QuadPart >>
+ fdoExtension->SectorShift); */
transferBytes = (ULONGLONG)rawReadInfo->SectorCount * RAW_SECTOR_SIZE;
endOffset = (ULONGLONG)rawReadInfo->SectorCount * COOKED_SECTOR_SIZE;
@@ -932,7 +931,7 @@
case IOCTL_DVD_SEND_KEY2: {
PDVD_COPY_PROTECT_KEY key = Irp->AssociatedIrp.SystemBuffer;
- ULONG keyLength;
+ //ULONG keyLength;
TraceLog((CdromDebugTrace,
"DvdDeviceControl: [%p] IOCTL_DVD_SEND_KEY\n", Irp));
@@ -1042,7 +1041,7 @@
} else {
- ULONG i;
+ //ULONG i;
UCHAR mask;
ULONG bufferLen;
PDVD_READ_STRUCTURE dvdReadStructure;
@@ -1866,11 +1865,11 @@
} else {
- PIO_STACK_LOCATION currentStack;
+ //PIO_STACK_LOCATION currentStack;
KeInitializeEvent(deviceControlEvent, NotificationEvent, FALSE);
- currentStack = IoGetCurrentIrpStackLocation(Irp);
+ //currentStack = IoGetCurrentIrpStackLocation(Irp);
nextStack = IoGetNextIrpStackLocation(Irp);
//
@@ -2017,9 +2016,9 @@
return status;
} // end CdRomDeviceControl()
-
NTSTATUS
+NTAPI
CdRomClassIoctlCompletion(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
@@ -2061,9 +2060,9 @@
return STATUS_MORE_PROCESSING_REQUIRED;
}
-
NTSTATUS
+NTAPI
CdRomDeviceControlCompletion(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
@@ -2423,9 +2422,9 @@
PDVD_DESCRIPTOR_HEADER header = realIrp->AssociatedIrp.SystemBuffer;
- FOUR_BYTE fourByte;
- PTWO_BYTE twoByte;
- UCHAR tmp;
+ //FOUR_BYTE fourByte;
+ //PTWO_BYTE twoByte;
+ //UCHAR tmp;
TraceLog((CdromDebugTrace,
"DvdDeviceControlCompletion - IOCTL_DVD_READ_STRUCTURE:
completing irp %p (buddy %p)\n",
@@ -2834,9 +2833,9 @@
CdRomCompleteIrpAndStartNextPacketSafely(DeviceObject, realIrp);
return STATUS_MORE_PROCESSING_REQUIRED;
}
-
NTSTATUS
+NTAPI
CdRomSetVolumeIntermediateCompletion(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
@@ -3180,8 +3179,9 @@
CdRomCompleteIrpAndStartNextPacketSafely(DeviceObject, realIrp);
return STATUS_MORE_PROCESSING_REQUIRED;
}
-
+
NTSTATUS
+NTAPI
CdRomDvdEndAllSessionsCompletion(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
@@ -3220,7 +3220,7 @@
PDVD_SESSION_ID sessionId = Irp->AssociatedIrp.SystemBuffer;
- NTSTATUS status;
+ //NTSTATUS status;
if(++(*sessionId) > MAX_COPY_PROTECT_AGID) {
@@ -3253,8 +3253,9 @@
return STATUS_MORE_PROCESSING_REQUIRED;
}
-
+
NTSTATUS
+NTAPI
CdRomDvdReadDiskKeyCompletion(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
@@ -3328,8 +3329,9 @@
return STATUS_SUCCESS;
}
-
+
NTSTATUS
+NTAPI
CdRomXACompletion(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
@@ -3509,9 +3511,9 @@
return status;
}
-
VOID
+NTAPI
CdRomDeviceControlDvdReadStructure(
IN PDEVICE_OBJECT Fdo,
IN PIRP OriginalIrp,
@@ -3630,9 +3632,9 @@
return;
}
-
VOID
+NTAPI
CdRomDeviceControlDvdEndSession(
IN PDEVICE_OBJECT Fdo,
IN PIRP OriginalIrp,
@@ -3659,9 +3661,9 @@
return;
}
-
VOID
+NTAPI
CdRomDeviceControlDvdStartSessionReadKey(
IN PDEVICE_OBJECT Fdo,
IN PIRP OriginalIrp,
@@ -3822,9 +3824,9 @@
}
return;
}
-
VOID
+NTAPI
CdRomDeviceControlDvdSendKey(
IN PDEVICE_OBJECT Fdo,
IN PIRP OriginalIrp,
@@ -3965,8 +3967,8 @@
return;
}
-
VOID
+NTAPI
CdRomInterpretReadCapacity(
IN PDEVICE_OBJECT Fdo,
IN PREAD_CAPACITY_DATA ReadCapacityBuffer
@@ -4073,5 +4075,3 @@
return;
}
-
-
Modified: trunk/reactos/drivers/storage/class/cdrom_new/mmc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/class/cdro…
==============================================================================
--- trunk/reactos/drivers/storage/class/cdrom_new/mmc.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/storage/class/cdrom_new/mmc.c [iso-8859-1] Tue Sep 25 20:59:32
2012
@@ -28,9 +28,8 @@
#include "classpnp.h"
#include "cdrom.h"
-
-
NTSTATUS
+NTAPI
CdRomGetConfiguration(
IN PDEVICE_OBJECT Fdo,
OUT PGET_CONFIGURATION_HEADER *Buffer,
@@ -38,18 +37,24 @@
IN FEATURE_NUMBER StartingFeature,
IN ULONG RequestedType
);
+
VOID
+NTAPI
CdRompPrintAllFeaturePages(
IN PGET_CONFIGURATION_HEADER Buffer,
IN ULONG Usable
);
+
NTSTATUS
+NTAPI
CdRomUpdateMmcDriveCapabilitiesCompletion(
IN PDEVICE_OBJECT Unused,
IN PIRP Irp,
IN PDEVICE_OBJECT Fdo
);
+
VOID
+NTAPI
CdRomPrepareUpdateCapabilitiesIrp(
PDEVICE_OBJECT Fdo
);
@@ -62,6 +67,7 @@
--*/
VOID
+NTAPI
CdRomFindProfileInProfiles(
IN PFEATURE_DATA_PROFILE_LIST ProfileHeader,
IN FEATURE_PROFILE_TYPE ProfileToFind,
@@ -107,6 +113,7 @@
--*/
PVOID
+NTAPI
CdRomFindFeaturePage(
IN PGET_CONFIGURATION_HEADER FeatureBuffer,
IN ULONG Length,
@@ -189,13 +196,14 @@
}
return NULL;
}
-
+
/*++
Private so we can later expose to someone wanting to use a preallocated buffer
--*/
NTSTATUS
+NTAPI
CdRompGetConfiguration(
IN PDEVICE_OBJECT Fdo,
IN PGET_CONFIGURATION_HEADER Buffer,
@@ -270,7 +278,7 @@
ASSERT(FALSE);
return STATUS_UNSUCCESSFUL;
}
-
+
/*++
Allocates buffer with configuration info, returns STATUS_SUCCESS
@@ -282,6 +290,7 @@
--*/
NTSTATUS
+NTAPI
CdRomGetConfiguration(
IN PDEVICE_OBJECT Fdo,
OUT PGET_CONFIGURATION_HEADER *Buffer,
@@ -290,7 +299,7 @@
IN ULONG RequestedType
)
{
- PFUNCTIONAL_DEVICE_EXTENSION fdoExtension;
+ //PFUNCTIONAL_DEVICE_EXTENSION fdoExtension;
GET_CONFIGURATION_HEADER header; // eight bytes, not a lot
PGET_CONFIGURATION_HEADER buffer;
ULONG returned;
@@ -301,7 +310,7 @@
PAGED_CODE();
- fdoExtension = Fdo->DeviceExtension;
+ //fdoExtension = Fdo->DeviceExtension;
*Buffer = NULL;
*BytesReturned = 0;
@@ -411,8 +420,9 @@
"information\n", i));
return STATUS_IO_DEVICE_ERROR;
}
-
+
VOID
+NTAPI
CdRomIsDeviceMmcDevice(
IN PDEVICE_OBJECT Fdo,
OUT PBOOLEAN IsMmc
@@ -541,6 +551,7 @@
}
VOID
+NTAPI
CdRompPrintAllFeaturePages(
IN PGET_CONFIGURATION_HEADER Buffer,
IN ULONG Usable
@@ -835,7 +846,7 @@
}
return;
}
-
+
NTSTATUS
NTAPI
CdRomUpdateMmcDriveCapabilitiesCompletion(
@@ -851,7 +862,7 @@
PSCSI_REQUEST_BLOCK srb = &(mmcData->CapabilitiesSrb);
PIO_STACK_LOCATION irpStack = IoGetCurrentIrpStackLocation(Irp);
NTSTATUS status = STATUS_UNSUCCESSFUL;
- PIRP delayedIrp;
+ //PIRP delayedIrp;
ULONG retryCount;
LARGE_INTEGER delay;
@@ -964,8 +975,8 @@
return STATUS_MORE_PROCESSING_REQUIRED;
}
-
VOID
+NTAPI
CdRomPrepareUpdateCapabilitiesIrp(
PDEVICE_OBJECT Fdo
)
@@ -1058,8 +1069,9 @@
return;
}
-
+
VOID
+NTAPI
CdRomUpdateMmcDriveCapabilities(
IN PDEVICE_OBJECT Fdo,
IN PVOID Context
@@ -1214,8 +1226,8 @@
return;
}
-
VOID
+NTAPI
CdRompFlushDelayedList(
IN PDEVICE_OBJECT Fdo,
IN PCDROM_MMC_EXTENSION MmcData,
@@ -1315,8 +1327,9 @@
return;
}
-
+
VOID
+NTAPI
CdRomDeAllocateMmcResources(
IN PDEVICE_OBJECT Fdo
)
@@ -1324,7 +1337,7 @@
PCOMMON_DEVICE_EXTENSION commonExtension = Fdo->DeviceExtension;
PCDROM_DATA cddata = commonExtension->DriverData;
PCDROM_MMC_EXTENSION mmcData = &cddata->Mmc;
- NTSTATUS status;
+ //NTSTATUS status;
if (mmcData->CapabilitiesWorkItem) {
IoFreeWorkItem(mmcData->CapabilitiesWorkItem);
@@ -1350,6 +1363,7 @@
}
NTSTATUS
+NTAPI
CdRomAllocateMmcResources(
IN PDEVICE_OBJECT Fdo
)
Modified: trunk/reactos/drivers/storage/class/cdrom_new/sec.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/class/cdro…
==============================================================================
--- trunk/reactos/drivers/storage/class/cdrom_new/sec.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/storage/class/cdrom_new/sec.c [iso-8859-1] Tue Sep 25 20:59:32
2012
@@ -7,8 +7,8 @@
#include "sec.h"
-
NTSTATUS
+NTAPI
CdRomGetRpc0Settings(
IN PDEVICE_OBJECT Fdo
)
@@ -21,9 +21,9 @@
return STATUS_SUCCESS;
}
-
NTSTATUS
+NTAPI
CdRomSetRpc0Settings(
IN PDEVICE_OBJECT Fdo,
IN UCHAR NewRegion
@@ -31,8 +31,3 @@
{
return STATUS_SUCCESS;
}
-
-
-
-
-
Modified: trunk/reactos/drivers/storage/class/cdrom_new/sec.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/class/cdro…
==============================================================================
--- trunk/reactos/drivers/storage/class/cdrom_new/sec.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/storage/class/cdrom_new/sec.h [iso-8859-1] Tue Sep 25 20:59:32
2012
@@ -4,8 +4,6 @@
--*/
-
#include "ntddk.h"
#include "classpnp.h"
#include "cdrom.h"
-