Author: akhaldi
Date: Sun Jul 29 02:05:26 2012
New Revision: 56974
URL:
http://svn.reactos.org/svn/reactos?rev=56974&view=rev
Log:
[DISK_NEW]
* Explicitly mark the functions as stdcall.
* Fix some warnings.
Modified:
trunk/reactos/drivers/storage/class/disk_new/CMakeLists.txt
trunk/reactos/drivers/storage/class/disk_new/disk.c
trunk/reactos/drivers/storage/class/disk_new/disk.h
trunk/reactos/drivers/storage/class/disk_new/diskwmi.c
trunk/reactos/drivers/storage/class/disk_new/enum.c
trunk/reactos/drivers/storage/class/disk_new/geometry.c
trunk/reactos/drivers/storage/class/disk_new/part.c
trunk/reactos/drivers/storage/class/disk_new/pnp.c
Modified: trunk/reactos/drivers/storage/class/disk_new/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/class/disk…
==============================================================================
--- trunk/reactos/drivers/storage/class/disk_new/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/drivers/storage/class/disk_new/CMakeLists.txt [iso-8859-1] Sun Jul 29
02:05:26 2012
@@ -16,13 +16,9 @@
target_link_libraries(disk_new libcntpr wdmguid)
if(ARCH MATCHES i386)
# FIXME:
http://www.cmake.org/Bug/view.php?id=12998
- if(MSVC)
- #add_target_compile_flags(disk_new "/Gz")
- set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "/Gz")
- else()
-
- #add_target_compile_flags(disk_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(disk_new "-Wno-format -Wno-pointer-sign")
+ set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-Wno-format
-Wno-pointer-sign")
endif()
endif()
Modified: trunk/reactos/drivers/storage/class/disk_new/disk.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/class/disk…
==============================================================================
--- trunk/reactos/drivers/storage/class/disk_new/disk.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/storage/class/disk_new/disk.c [iso-8859-1] Sun Jul 29 02:05:26
2012
@@ -31,6 +31,7 @@
#include "ioevent.h"
NTSTATUS
+NTAPI
DiskDetermineMediaTypes(
IN PDEVICE_OBJECT Fdo,
IN PIRP Irp,
@@ -41,18 +42,21 @@
);
PPARTITION_INFORMATION_EX
+NTAPI
DiskPdoFindPartitionEntry(
IN PPHYSICAL_DEVICE_EXTENSION Pdo,
IN PDRIVE_LAYOUT_INFORMATION_EX LayoutInfo
);
PPARTITION_INFORMATION_EX
+NTAPI
DiskFindAdjacentPartition(
IN PDRIVE_LAYOUT_INFORMATION_EX LayoutInfo,
IN PPARTITION_INFORMATION_EX BasePartition
);
PPARTITION_INFORMATION_EX
+NTAPI
DiskFindContainingPartition(
IN PDRIVE_LAYOUT_INFORMATION_EX LayoutInfo,
IN PPARTITION_INFORMATION_EX BasePartition,
@@ -60,72 +64,84 @@
);
NTSTATUS
+NTAPI
DiskIoctlCreateDisk(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp
);
NTSTATUS
+NTAPI
DiskIoctlGetDriveLayout(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp
);
NTSTATUS
+NTAPI
DiskIoctlGetDriveLayoutEx(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp
);
NTSTATUS
+NTAPI
DiskIoctlSetDriveLayout(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp
);
NTSTATUS
+NTAPI
DiskIoctlSetDriveLayoutEx(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp
);
NTSTATUS
+NTAPI
DiskIoctlGetPartitionInfo(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp
);
NTSTATUS
+NTAPI
DiskIoctlGetPartitionInfoEx(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp
);
NTSTATUS
+NTAPI
DiskIoctlGetLengthInfo(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp
);
NTSTATUS
+NTAPI
DiskIoctlSetPartitionInfo(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp
);
NTSTATUS
+NTAPI
DiskIoctlSetPartitionInfoEx(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp
);
NTSTATUS
+NTAPI
DiskIoctlSetPartitionInfoEx(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp
);
NTSTATUS
+NTAPI
DiskIoctlGetDriveGeometryEx(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp
@@ -171,7 +187,6 @@
#define DiskCompareGuid(_First,_Second) \
(memcmp ((_First),(_Second), sizeof (GUID)))
-
NTSTATUS
NTAPI
DriverEntry(
@@ -342,8 +357,8 @@
} // end DriverEntry()
-
VOID
+NTAPI
DiskUnload(
IN PDRIVER_OBJECT DriverObject
)
@@ -356,8 +371,8 @@
return;
}
-
NTSTATUS
+NTAPI
DiskCreateFdo(
IN PDRIVER_OBJECT DriverObject,
IN PDEVICE_OBJECT PhysicalDeviceObject,
@@ -393,8 +408,8 @@
{
CCHAR ntNameBuffer[MAXIMUM_FILENAME_LENGTH];
- STRING ntNameString;
- UNICODE_STRING ntUnicodeString;
+ //STRING ntNameString;
+ //UNICODE_STRING ntUnicodeString;
PUCHAR deviceName = NULL;
@@ -407,8 +422,8 @@
PDEVICE_OBJECT deviceObject = NULL;
PFUNCTIONAL_DEVICE_EXTENSION fdoExtension;
- STORAGE_PROPERTY_ID propertyId;
- PSTORAGE_DEVICE_DESCRIPTOR deviceDescriptor;
+ //STORAGE_PROPERTY_ID propertyId;
+ //PSTORAGE_DEVICE_DESCRIPTOR deviceDescriptor;
PAGED_CODE();
@@ -628,8 +643,8 @@
return(status);
}
-
NTSTATUS
+NTAPI
DiskReadWriteVerification(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp
@@ -742,9 +757,8 @@
} // end DiskReadWrite()
-
-
NTSTATUS
+NTAPI
DiskDetermineMediaTypes(
IN PDEVICE_OBJECT Fdo,
IN PIRP Irp,
@@ -777,8 +791,8 @@
{
PFUNCTIONAL_DEVICE_EXTENSION fdoExtension = Fdo->DeviceExtension;
- PPHYSICAL_DEVICE_EXTENSION pdoExtension = Fdo->DeviceExtension;
- PCOMMON_DEVICE_EXTENSION commonExtension = Fdo->DeviceExtension;
+ //PPHYSICAL_DEVICE_EXTENSION pdoExtension = Fdo->DeviceExtension;
+ //PCOMMON_DEVICE_EXTENSION commonExtension = Fdo->DeviceExtension;
PIO_STACK_LOCATION irpStack = IoGetCurrentIrpStackLocation(Irp);
PGET_MEDIA_TYPES mediaTypes = Irp->AssociatedIrp.SystemBuffer;
@@ -1008,8 +1022,8 @@
}
-
NTSTATUS
+NTAPI
DiskDeviceControl(
PDEVICE_OBJECT DeviceObject,
PIRP Irp
@@ -1041,7 +1055,7 @@
{
PFUNCTIONAL_DEVICE_EXTENSION fdoExtension = DeviceObject->DeviceExtension;
- PPHYSICAL_DEVICE_EXTENSION pdoExtension = DeviceObject->DeviceExtension;
+ //PPHYSICAL_DEVICE_EXTENSION pdoExtension = DeviceObject->DeviceExtension;
PCOMMON_DEVICE_EXTENSION commonExtension = DeviceObject->DeviceExtension;
PIO_STACK_LOCATION irpStack = IoGetCurrentIrpStackLocation(Irp);
@@ -2772,7 +2786,7 @@
PDRIVE_LAYOUT_INFORMATION_EX layoutInfo;
PPARTITION_INFORMATION_EX pdoPartition;
PPARTITION_INFORMATION_EX containerPartition;
- ULONG partitionIndex;
+ //ULONG partitionIndex;
DebugPrint((2, "IOCTL_DISK_GROW_PARTITION to device %p through "
"irp %p\n",
@@ -2940,16 +2954,16 @@
sibling = commonExtension->ChildList;
while(sibling != NULL) {
- LARGE_INTEGER sibStoppingOffset;
+ //LARGE_INTEGER sibStoppingOffset;
PCOMMON_DEVICE_EXTENSION siblingExtension;
siblingExtension = &(sibling->CommonExtension);
ASSERT( siblingExtension );
- sibStoppingOffset.QuadPart =
+ /* sibStoppingOffset.QuadPart =
(siblingExtension->StartingOffset.QuadPart +
- siblingExtension->PartitionLength.QuadPart - 1);
+ siblingExtension->PartitionLength.QuadPart - 1); */
//
// Only check the siblings that start beyond the new partition
@@ -3267,8 +3281,8 @@
} // end DiskDeviceControl()
-
NTSTATUS
+NTAPI
DiskShutdownFlush (
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp
@@ -3457,8 +3471,8 @@
return STATUS_PENDING;
} // end DiskShutdown()
-
NTSTATUS
+NTAPI
DiskModeSelect(
IN PDEVICE_OBJECT Fdo,
IN PCHAR ModeSelectBuffer,
@@ -3595,11 +3609,11 @@
return status;
} // end DiskModeSelect()
-
//
// This routine is structured as a work-item routine
//
VOID
+NTAPI
DisableWriteCache(
IN PDEVICE_OBJECT Fdo,
IN PIO_WORKITEM WorkItem
@@ -3667,11 +3681,11 @@
IoFreeWorkItem(WorkItem);
}
-
//
// This routine is structured as a work-item routine
//
VOID
+NTAPI
DiskIoctlVerify(
IN PDEVICE_OBJECT Fdo,
IN PDISK_VERIFY_WORKITEM_CONTEXT Context
@@ -3785,9 +3799,8 @@
ExFreePool(Context);
}
-
-
VOID
+NTAPI
DiskFdoProcessError(
PDEVICE_OBJECT Fdo,
PSCSI_REQUEST_BLOCK Srb,
@@ -3992,8 +4005,8 @@
return;
}
-
VOID
+NTAPI
DiskSetSpecialHacks(
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
IN ULONG_PTR Data
@@ -4095,8 +4108,8 @@
return;
}
-
VOID
+NTAPI
DiskScanRegistryForSpecial(
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension
)
@@ -4145,8 +4158,8 @@
}
}
-
VOID
+NTAPI
ResetBus(
IN PDEVICE_OBJECT Fdo
)
@@ -4255,8 +4268,8 @@
} // end ResetBus()
-
NTSTATUS
+NTAPI
DiskQueryPnpCapabilities(
IN PDEVICE_OBJECT DeviceObject,
IN PDEVICE_CAPABILITIES Capabilities
@@ -4264,7 +4277,7 @@
{
PCOMMON_DEVICE_EXTENSION commonExtension = DeviceObject->DeviceExtension;
- PDISK_DATA diskData = commonExtension->DriverData;
+ //PDISK_DATA diskData = commonExtension->DriverData;
PAGED_CODE();
@@ -4275,8 +4288,7 @@
return STATUS_NOT_IMPLEMENTED;
} else {
- PPHYSICAL_DEVICE_EXTENSION physicalExtension =
- DeviceObject->DeviceExtension;
+ //PPHYSICAL_DEVICE_EXTENSION physicalExtension =
DeviceObject->DeviceExtension;
Capabilities->SilentInstall = 1;
Capabilities->RawDeviceOK = 1;
@@ -4298,8 +4310,8 @@
return STATUS_SUCCESS;
}
-
NTSTATUS
+NTAPI
DiskGetCacheInformation(
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
IN PDISK_CACHE_INFORMATION CacheInfo
@@ -4311,7 +4323,7 @@
ULONG length;
- NTSTATUS status;
+ //NTSTATUS status;
PAGED_CODE();
@@ -4416,8 +4428,8 @@
return STATUS_SUCCESS;
}
-
NTSTATUS
+NTAPI
DiskSetCacheInformation(
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
IN PDISK_CACHE_INFORMATION CacheInfo
@@ -4615,8 +4627,8 @@
return status;
}
-
PPARTITION_INFORMATION_EX
+NTAPI
DiskPdoFindPartitionEntry(
IN PPHYSICAL_DEVICE_EXTENSION Pdo,
IN PDRIVE_LAYOUT_INFORMATION_EX LayoutInfo
@@ -4679,8 +4691,8 @@
return NULL;
}
-
PPARTITION_INFORMATION_EX
+NTAPI
DiskFindAdjacentPartition(
IN PDRIVE_LAYOUT_INFORMATION_EX LayoutInfo,
IN PPARTITION_INFORMATION_EX BasePartition
@@ -4751,8 +4763,8 @@
return adjacentPartition;
}
-
PPARTITION_INFORMATION_EX
+NTAPI
DiskFindContainingPartition(
IN PDRIVE_LAYOUT_INFORMATION_EX LayoutInfo,
IN PPARTITION_INFORMATION_EX BasePartition,
@@ -4846,8 +4858,8 @@
return containerPartition;
}
-
NTSTATUS
+NTAPI
DiskGetInfoExceptionInformation(
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
IN PMODE_INFO_EXCEPTIONS ReturnPageData
@@ -4938,8 +4950,8 @@
return(status);
}
-
NTSTATUS
+NTAPI
DiskSetInfoExceptionInformation(
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
IN PMODE_INFO_EXCEPTIONS PageData
@@ -4976,7 +4988,7 @@
#if 0
#if defined(_X86_)
-
+
NTSTATUS
DiskQuerySuggestedLinkName(
IN PDEVICE_OBJECT DeviceObject,
@@ -5155,8 +5167,8 @@
#endif
#endif
-
NTSTATUS
+NTAPI
DiskIoctlCreateDisk(
IN OUT PDEVICE_OBJECT DeviceObject,
IN OUT PIRP Irp
@@ -5186,7 +5198,7 @@
PCOMMON_DEVICE_EXTENSION commonExtension;
PFUNCTIONAL_DEVICE_EXTENSION fdoExtension;
PIO_STACK_LOCATION irpStack;
- PDISK_DATA diskData;
+ //PDISK_DATA diskData;
PCREATE_DISK createDiskInfo;
@@ -5203,7 +5215,7 @@
fdoExtension = DeviceObject->DeviceExtension;
irpStack = IoGetCurrentIrpStackLocation(Irp);
- diskData = (PDISK_DATA)(commonExtension->DriverData);
+ //diskData = (PDISK_DATA)(commonExtension->DriverData);
ASSERT (commonExtension->IsFdo);
@@ -5252,9 +5264,8 @@
return status;
}
-
-
NTSTATUS
+NTAPI
DiskIoctlGetDriveLayout(
IN OUT PDEVICE_OBJECT DeviceObject,
IN OUT PIRP Irp
@@ -5288,11 +5299,11 @@
PDRIVE_LAYOUT_INFORMATION partitionList;
PDRIVE_LAYOUT_INFORMATION_EX partitionListEx;
PFUNCTIONAL_DEVICE_EXTENSION fdoExtension;
- PPHYSICAL_DEVICE_EXTENSION pdoExtension;
+ //PPHYSICAL_DEVICE_EXTENSION pdoExtension;
PCOMMON_DEVICE_EXTENSION commonExtension;
PIO_STACK_LOCATION irpStack;
PDISK_DATA diskData;
- BOOLEAN invalidateBusRelations;
+ //BOOLEAN invalidateBusRelations;
PAGED_CODE ();
@@ -5408,9 +5419,8 @@
return status;
}
-
-
NTSTATUS
+NTAPI
DiskIoctlGetDriveLayoutEx(
IN OUT PDEVICE_OBJECT DeviceObject,
IN OUT PIRP Irp
@@ -5443,7 +5453,7 @@
ULONG size;
PDRIVE_LAYOUT_INFORMATION_EX partitionList;
PFUNCTIONAL_DEVICE_EXTENSION fdoExtension;
- PPHYSICAL_DEVICE_EXTENSION pdoExtension;
+ //PPHYSICAL_DEVICE_EXTENSION pdoExtension;
PCOMMON_DEVICE_EXTENSION commonExtension;
PIO_STACK_LOCATION irpStack;
PDISK_DATA diskData;
@@ -5460,7 +5470,7 @@
//
fdoExtension = DeviceObject->DeviceExtension;
- pdoExtension = DeviceObject->DeviceExtension;
+ //pdoExtension = DeviceObject->DeviceExtension;
commonExtension = DeviceObject->DeviceExtension;
irpStack = IoGetCurrentIrpStackLocation(Irp);
@@ -5532,8 +5542,8 @@
return status;
}
-
NTSTATUS
+NTAPI
DiskIoctlSetDriveLayout(
IN OUT PDEVICE_OBJECT DeviceObject,
IN OUT PIRP Irp
@@ -5564,11 +5574,11 @@
PDRIVE_LAYOUT_INFORMATION partitionList;
PDRIVE_LAYOUT_INFORMATION_EX partitionListEx;
PFUNCTIONAL_DEVICE_EXTENSION fdoExtension;
- PPHYSICAL_DEVICE_EXTENSION pdoExtension;
+ //PPHYSICAL_DEVICE_EXTENSION pdoExtension;
PCOMMON_DEVICE_EXTENSION commonExtension;
PIO_STACK_LOCATION irpStack;
PDISK_DATA diskData;
- BOOLEAN invalidateBusRelations;
+ //BOOLEAN invalidateBusRelations;
SIZE_T listSize;
SIZE_T inputBufferLength;
SIZE_T outputBufferLength;
@@ -5585,7 +5595,7 @@
partitionListEx = NULL;
partitionList = NULL;
fdoExtension = DeviceObject->DeviceExtension;
- pdoExtension = DeviceObject->DeviceExtension;
+ //pdoExtension = DeviceObject->DeviceExtension;
commonExtension = DeviceObject->DeviceExtension;
irpStack = IoGetCurrentIrpStackLocation(Irp);
@@ -5691,9 +5701,8 @@
return status;
}
-
-
NTSTATUS
+NTAPI
DiskIoctlSetDriveLayoutEx(
IN OUT PDEVICE_OBJECT DeviceObject,
IN OUT PIRP Irp
@@ -5728,7 +5737,7 @@
PIO_STACK_LOCATION irpStack;
PDISK_DATA diskData;
- BOOLEAN invalidateBusRelations;
+ //BOOLEAN invalidateBusRelations;
SIZE_T listSize;
SIZE_T inputBufferLength;
SIZE_T outputBufferLength;
@@ -5849,8 +5858,8 @@
return status;
}
-
NTSTATUS
+NTAPI
DiskIoctlGetPartitionInfo(
IN OUT PDEVICE_OBJECT DeviceObject,
IN OUT PIRP Irp
@@ -6002,8 +6011,8 @@
return status;
}
-
NTSTATUS
+NTAPI
DiskIoctlGetPartitionInfoEx(
IN OUT PDEVICE_OBJECT DeviceObject,
IN OUT PIRP Irp
@@ -6126,9 +6135,8 @@
return status;
}
-
-
NTSTATUS
+NTAPI
DiskIoctlGetLengthInfo(
IN OUT PDEVICE_OBJECT DeviceObject,
IN OUT PIRP Irp
@@ -6136,7 +6144,7 @@
{
NTSTATUS status;
PIO_STACK_LOCATION irpStack;
- PDISK_DATA diskData;
+ //PDISK_DATA diskData;
PGET_LENGTH_INFORMATION lengthInfo;
PFUNCTIONAL_DEVICE_EXTENSION p0Extension;
PCOMMON_DEVICE_EXTENSION commonExtension;
@@ -6156,7 +6164,7 @@
commonExtension = DeviceObject->DeviceExtension;
irpStack = IoGetCurrentIrpStackLocation(Irp);
- diskData = (PDISK_DATA)(commonExtension->DriverData);
+ //diskData = (PDISK_DATA)(commonExtension->DriverData);
p0Extension = commonExtension->PartitionZeroExtension;
partitionZeroData = ((PDISK_DATA) p0Extension->CommonExtension.DriverData);
@@ -6221,9 +6229,8 @@
return status;
}
-
-
NTSTATUS
+NTAPI
DiskIoctlSetPartitionInfo(
IN OUT PDEVICE_OBJECT DeviceObject,
IN OUT PIRP Irp
@@ -6298,8 +6305,8 @@
return status;
}
-
NTSTATUS
+NTAPI
DiskIoctlSetPartitionInfoEx(
IN OUT PDEVICE_OBJECT DeviceObject,
IN OUT PIRP Irp
@@ -6394,9 +6401,8 @@
} DISK_GEOMETRY_EX_INTERNAL, *PDISK_GEOMETRY_EX_INTERNAL;
-
-
NTSTATUS
+NTAPI
DiskIoctlGetDriveGeometryEx(
IN PDEVICE_OBJECT DeviceObject,
IN OUT PIRP Irp
@@ -6573,4 +6579,3 @@
return status;
}
-
Modified: trunk/reactos/drivers/storage/class/disk_new/disk.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/class/disk…
==============================================================================
--- trunk/reactos/drivers/storage/class/disk_new/disk.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/storage/class/disk_new/disk.h [iso-8859-1] Sun Jul 29 02:05:26
2012
@@ -63,7 +63,7 @@
typedef
VOID
-(*PDISK_UPDATE_PARTITIONS) (
+(NTAPI *PDISK_UPDATE_PARTITIONS) (
IN PDEVICE_OBJECT Fdo,
IN OUT PDRIVE_LAYOUT_INFORMATION_EX PartitionList
);
@@ -394,69 +394,80 @@
// Routine prototypes.
//
-
-NTSTATUS
+NTSTATUS
+NTAPI
DriverEntry(
IN PDRIVER_OBJECT DriverObject,
IN PUNICODE_STRING RegistryPath
);
VOID
+NTAPI
DiskUnload(
IN PDRIVER_OBJECT DriverObject
);
NTSTATUS
+NTAPI
DiskAddDevice(
IN PDRIVER_OBJECT DriverObject,
IN PDEVICE_OBJECT Pdo
);
NTSTATUS
+NTAPI
DiskInitFdo(
IN PDEVICE_OBJECT Fdo
);
NTSTATUS
+NTAPI
DiskInitPdo(
IN PDEVICE_OBJECT Pdo
);
NTSTATUS
+NTAPI
DiskStartFdo(
IN PDEVICE_OBJECT Fdo
);
NTSTATUS
+NTAPI
DiskStartPdo(
IN PDEVICE_OBJECT Pdo
);
NTSTATUS
+NTAPI
DiskStopDevice(
IN PDEVICE_OBJECT DeviceObject,
IN UCHAR Type
);
NTSTATUS
+NTAPI
DiskRemoveDevice(
IN PDEVICE_OBJECT DeviceObject,
IN UCHAR Type
);
NTSTATUS
+NTAPI
DiskReadWriteVerification(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp
);
NTSTATUS
+NTAPI
DiskDeviceControl(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp
);
VOID
+NTAPI
DiskFdoProcessError(
PDEVICE_OBJECT DeviceObject,
PSCSI_REQUEST_BLOCK Srb,
@@ -465,36 +476,42 @@
);
NTSTATUS
+NTAPI
DiskShutdownFlush(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp
);
NTSTATUS
+NTAPI
DiskGetCacheInformation(
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
IN PDISK_CACHE_INFORMATION CacheInfo
);
NTSTATUS
+NTAPI
DiskSetCacheInformation(
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
IN PDISK_CACHE_INFORMATION CacheInfo
);
VOID
+NTAPI
DisableWriteCache(
IN PDEVICE_OBJECT DeviceObject,
IN PIO_WORKITEM WorkItem
);
VOID
+NTAPI
DiskIoctlVerify(
IN PDEVICE_OBJECT DeviceObject,
IN PDISK_VERIFY_WORKITEM_CONTEXT Context
);
NTSTATUS
+NTAPI
DiskModeSelect(
IN PDEVICE_OBJECT DeviceObject,
IN PCHAR ModeSelectBuffer,
@@ -518,6 +535,7 @@
NTSTATUS
+NTAPI
DiskPerformSmartCommand(
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
IN ULONG SrbControlCode,
@@ -530,24 +548,28 @@
);
NTSTATUS
+NTAPI
DiskGetInfoExceptionInformation(
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
OUT PMODE_INFO_EXCEPTIONS ReturnPageData
);
NTSTATUS
+NTAPI
DiskSetInfoExceptionInformation(
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
IN PMODE_INFO_EXCEPTIONS PageData
);
NTSTATUS
+NTAPI
DiskDetectFailurePrediction(
PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
PFAILURE_PREDICTION_METHOD FailurePredictCapability
);
BOOLEAN
+NTAPI
EnumerateBusKey(
IN PFUNCTIONAL_DEVICE_EXTENSION DeviceExtension,
HANDLE BusKey,
@@ -555,6 +577,7 @@
);
NTSTATUS
+NTAPI
DiskCreateFdo(
IN PDRIVER_OBJECT DriverObject,
IN PDEVICE_OBJECT LowerDeviceObject,
@@ -563,33 +586,39 @@
);
VOID
+NTAPI
UpdateDeviceObjects(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp
);
VOID
+NTAPI
DiskSetSpecialHacks(
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
IN ULONG_PTR Data
);
VOID
+NTAPI
DiskScanRegistryForSpecial(
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension
);
VOID
+NTAPI
ResetBus(
IN PDEVICE_OBJECT DeviceObject
);
NTSTATUS
+NTAPI
DiskEnumerateDevice(
IN PDEVICE_OBJECT Fdo
);
NTSTATUS
+NTAPI
DiskQueryId(
IN PDEVICE_OBJECT Pdo,
IN BUS_QUERY_ID_TYPE IdType,
@@ -597,12 +626,14 @@
);
NTSTATUS
+NTAPI
DiskQueryPnpCapabilities(
IN PDEVICE_OBJECT DeviceObject,
IN PDEVICE_CAPABILITIES Capabilities
);
NTSTATUS
+NTAPI
DiskGenerateDeviceName(
IN BOOLEAN IsFdo,
IN ULONG DeviceNumber,
@@ -613,23 +644,27 @@
);
VOID
+NTAPI
DiskCreateSymbolicLinks(
IN PDEVICE_OBJECT DeviceObject
);
VOID
+NTAPI
DiskUpdatePartitions(
IN PDEVICE_OBJECT Fdo,
IN OUT PDRIVE_LAYOUT_INFORMATION_EX PartitionList
);
VOID
+NTAPI
DiskUpdateRemovablePartitions(
IN PDEVICE_OBJECT Fdo,
IN OUT PDRIVE_LAYOUT_INFORMATION_EX PartitionList
);
NTSTATUS
+NTAPI
DiskCreatePdo(
IN PDEVICE_OBJECT Fdo,
IN ULONG PartitionOrdinal,
@@ -639,11 +674,13 @@
);
VOID
+NTAPI
DiskDeleteSymbolicLinks(
IN PDEVICE_OBJECT DeviceObject
);
NTSTATUS
+NTAPI
DiskPdoQueryWmiRegInfo(
IN PDEVICE_OBJECT DeviceObject,
OUT ULONG *RegFlags,
@@ -651,6 +688,7 @@
);
NTSTATUS
+NTAPI
DiskPdoQueryWmiDataBlock(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
@@ -660,6 +698,7 @@
);
NTSTATUS
+NTAPI
DiskPdoSetWmiDataBlock(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
@@ -669,6 +708,7 @@
);
NTSTATUS
+NTAPI
DiskPdoSetWmiDataItem(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
@@ -679,6 +719,7 @@
);
NTSTATUS
+NTAPI
DiskPdoExecuteWmiMethod(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
@@ -690,6 +731,7 @@
);
NTSTATUS
+NTAPI
DiskFdoQueryWmiRegInfo(
IN PDEVICE_OBJECT DeviceObject,
OUT ULONG *RegFlags,
@@ -697,6 +739,7 @@
);
NTSTATUS
+NTAPI
DiskFdoQueryWmiRegInfoEx(
IN PDEVICE_OBJECT DeviceObject,
OUT ULONG *RegFlags,
@@ -705,6 +748,7 @@
);
NTSTATUS
+NTAPI
DiskFdoQueryWmiDataBlock(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
@@ -714,6 +758,7 @@
);
NTSTATUS
+NTAPI
DiskFdoSetWmiDataBlock(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
@@ -723,6 +768,7 @@
);
NTSTATUS
+NTAPI
DiskFdoSetWmiDataItem(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
@@ -733,6 +779,7 @@
);
NTSTATUS
+NTAPI
DiskFdoExecuteWmiMethod(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
@@ -744,6 +791,7 @@
);
NTSTATUS
+NTAPI
DiskWmiFunctionControl(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
@@ -753,24 +801,28 @@
);
NTSTATUS
+NTAPI
DiskReadFailurePredictStatus(
PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
PSTORAGE_FAILURE_PREDICT_STATUS DiskSmartStatus
);
NTSTATUS
+NTAPI
DiskReadFailurePredictData(
PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
PSTORAGE_FAILURE_PREDICT_DATA DiskSmartData
);
NTSTATUS
+NTAPI
DiskEnableDisableFailurePrediction(
PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
BOOLEAN Enable
);
NTSTATUS
+NTAPI
DiskEnableDisableFailurePredictPolling(
PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
BOOLEAN Enable,
@@ -778,16 +830,18 @@
);
VOID
+NTAPI
DiskAcquirePartitioningLock(
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension
);
VOID
+NTAPI
DiskReleasePartitioningLock(
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension
);
-NTSTATUS DiskInitializeReregistration(
+NTSTATUS NTAPI DiskInitializeReregistration(
void
);
@@ -796,6 +850,7 @@
#if defined(_X86_)
NTSTATUS
+NTAPI
DiskReadDriveCapacity(
IN PDEVICE_OBJECT Fdo
);
@@ -815,16 +870,19 @@
#endif
NTSTATUS
+NTAPI
DiskSaveDetectInfo(
PDRIVER_OBJECT DriverObject
);
VOID
+NTAPI
DiskCleanupDetectInfo(
IN PDRIVER_OBJECT DriverObject
);
VOID
+NTAPI
DiskDriverReinitialization (
IN PDRIVER_OBJECT DriverObject,
IN PVOID Nothing,
@@ -834,22 +892,26 @@
#endif
VOID
+NTAPI
DiskConvertPartitionToExtended(
IN PPARTITION_INFORMATION Partition,
OUT PPARTITION_INFORMATION_EX PartitionEx
);
PDRIVE_LAYOUT_INFORMATION_EX
+NTAPI
DiskConvertLayoutToExtended(
IN CONST PDRIVE_LAYOUT_INFORMATION Layout
);
PDRIVE_LAYOUT_INFORMATION
+NTAPI
DiskConvertExtendedToLayout(
IN CONST PDRIVE_LAYOUT_INFORMATION_EX LayoutEx
);
NTSTATUS
+NTAPI
DiskReadPartitionTableEx(
IN PFUNCTIONAL_DEVICE_EXTENSION Fdo,
IN BOOLEAN BypassCache,
@@ -857,12 +919,14 @@
);
NTSTATUS
+NTAPI
DiskWritePartitionTableEx(
IN PFUNCTIONAL_DEVICE_EXTENSION Fdo,
IN PDRIVE_LAYOUT_INFORMATION_EX DriveLayout
);
NTSTATUS
+NTAPI
DiskSetPartitionInformationEx(
IN PFUNCTIONAL_DEVICE_EXTENSION Fdo,
IN ULONG PartitionNumber,
@@ -870,6 +934,7 @@
);
NTSTATUS
+NTAPI
DiskSetPartitionInformation(
IN PFUNCTIONAL_DEVICE_EXTENSION Fdo,
IN ULONG SectorSize,
@@ -878,12 +943,14 @@
);
NTSTATUS
+NTAPI
DiskVerifyPartitionTable(
IN PFUNCTIONAL_DEVICE_EXTENSION Fdo,
IN BOOLEAN FixErrors
);
BOOLEAN
+NTAPI
DiskInvalidatePartitionTable(
IN PFUNCTIONAL_DEVICE_EXTENSION Fdo,
IN BOOLEAN PartitionLockHeld
@@ -891,12 +958,14 @@
#if defined (_X86_)
NTSTATUS
+NTAPI
DiskGetDetectInfo(
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
OUT PDISK_DETECTION_INFO DetectInfo
);
NTSTATUS
+NTAPI
DiskReadSignature(
IN PDEVICE_OBJECT Fdo
);
Modified: trunk/reactos/drivers/storage/class/disk_new/diskwmi.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/class/disk…
==============================================================================
--- trunk/reactos/drivers/storage/class/disk_new/diskwmi.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/storage/class/disk_new/diskwmi.c [iso-8859-1] Sun Jul 29
02:05:26 2012
@@ -23,30 +23,35 @@
#include "disk.h"
NTSTATUS
+NTAPI
DiskSendFailurePredictIoctl(
PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
PSTORAGE_PREDICT_FAILURE checkFailure
);
NTSTATUS
+NTAPI
DiskGetIdentifyInfo(
PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
PBOOLEAN SupportSmart
);
NTSTATUS
+NTAPI
DiskDetectFailurePrediction(
PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
PFAILURE_PREDICTION_METHOD FailurePredictCapability
);
NTSTATUS
+NTAPI
DiskReadFailurePredictThresholds(
PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
PSTORAGE_FAILURE_PREDICT_THRESHOLDS DiskSmartThresholds
);
NTSTATUS
+NTAPI
DiskReadSmartLog(
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
IN UCHAR SectorCount,
@@ -55,6 +60,7 @@
);
NTSTATUS
+NTAPI
DiskWriteSmartLog(
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
IN UCHAR SectorCount,
@@ -62,7 +68,7 @@
IN PUCHAR Buffer
);
-void DiskReregWorker(
+void NTAPI DiskReregWorker(
IN PVOID Context
);
@@ -382,6 +388,7 @@
NTSTATUS
+NTAPI
DiskReadSmartLog(
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
IN UCHAR SectorCount,
@@ -433,6 +440,7 @@
NTSTATUS
+NTAPI
DiskWriteSmartLog(
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
IN UCHAR SectorCount,
@@ -477,8 +485,9 @@
}
return(status);
}
-
+
NTSTATUS
+NTAPI
DiskPerformSmartCommand(
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
IN ULONG SrbControlCode,
@@ -526,8 +535,8 @@
PDISK_DATA diskData = (PDISK_DATA)(commonExtension->DriverData);
PUCHAR buffer;
PSENDCMDINPARAMS cmdInParameters;
- PSENDCMDOUTPARAMS cmdOutParameters;
- ULONG outBufferSize;
+ //PSENDCMDOUTPARAMS cmdOutParameters;
+ //ULONG outBufferSize;
NTSTATUS status;
ULONG availableBufferSize;
KEVENT event;
@@ -549,7 +558,7 @@
buffer += sizeof(SRB_IO_CONTROL);
cmdInParameters = (PSENDCMDINPARAMS)buffer;
- cmdOutParameters = (PSENDCMDOUTPARAMS)buffer;
+ //cmdOutParameters = (PSENDCMDOUTPARAMS)buffer;
availableBufferSize = *BufferSize - sizeof(SRB_IO_CONTROL);
@@ -776,8 +785,8 @@
return status;
}
-
NTSTATUS
+NTAPI
DiskGetIdentifyInfo(
PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
PBOOLEAN SupportSmart
@@ -813,12 +822,12 @@
return status;
}
-
//
// FP Ioctl specific routines
//
NTSTATUS
+NTAPI
DiskSendFailurePredictIoctl(
PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
PSTORAGE_PREDICT_FAILURE checkFailure
@@ -865,12 +874,12 @@
return status;
}
-
//
// FP type independent routines
//
NTSTATUS
+NTAPI
DiskEnableDisableFailurePrediction(
PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
BOOLEAN Enable
@@ -934,6 +943,7 @@
}
NTSTATUS
+NTAPI
DiskEnableDisableFailurePredictPolling(
PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
BOOLEAN Enable,
@@ -990,8 +1000,8 @@
return status;
}
-
NTSTATUS
+NTAPI
DiskReadFailurePredictStatus(
PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
PSTORAGE_FAILURE_PREDICT_STATUS DiskSmartStatus
@@ -1067,6 +1077,7 @@
}
NTSTATUS
+NTAPI
DiskReadFailurePredictData(
PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
PSTORAGE_FAILURE_PREDICT_DATA DiskSmartData
@@ -1158,6 +1169,7 @@
}
NTSTATUS
+NTAPI
DiskReadFailurePredictThresholds(
PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
PSTORAGE_FAILURE_PREDICT_THRESHOLDS DiskSmartThresholds
@@ -1239,7 +1251,7 @@
return status;
}
-void DiskReregWorker(
+void NTAPI DiskReregWorker(
IN PVOID Context
)
{
@@ -1284,7 +1296,7 @@
}
-NTSTATUS DiskInitializeReregistration(
+NTSTATUS NTAPI DiskInitializeReregistration(
void
)
{
@@ -1303,7 +1315,7 @@
return(STATUS_SUCCESS);
}
-NTSTATUS DiskPostReregisterRequest(
+NTSTATUS NTAPI DiskPostReregisterRequest(
PDEVICE_OBJECT DeviceObject,
PIRP Irp
)
@@ -1344,7 +1356,7 @@
return(status);
}
-NTSTATUS DiskInfoExceptionComplete(
+NTSTATUS NTAPI DiskInfoExceptionComplete(
PDEVICE_OBJECT DeviceObject,
PIRP Irp,
PVOID Context
@@ -1361,7 +1373,7 @@
ULONG retryInterval;
ULONG srbStatus;
BOOLEAN freeLockAndIrp = TRUE;
- KIRQL oldIrql;
+ //KIRQL oldIrql;
ASSERT(fdoExtension->CommonExtension.IsFdo);
@@ -1545,7 +1557,7 @@
}
-NTSTATUS DiskInfoExceptionCheck(
+NTSTATUS NTAPI DiskInfoExceptionCheck(
PFUNCTIONAL_DEVICE_EXTENSION FdoExtension
)
{
@@ -1760,6 +1772,7 @@
}
NTSTATUS
+NTAPI
DiskDetectFailurePrediction(
PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
PFAILURE_PREDICTION_METHOD FailurePredictCapability
@@ -1799,7 +1812,7 @@
NTSTATUS status;
STORAGE_PREDICT_FAILURE checkFailure;
STORAGE_FAILURE_PREDICT_STATUS diskSmartStatus;
- BOOLEAN logErr;
+ //BOOLEAN logErr;
PAGED_CODE();
@@ -1881,8 +1894,8 @@
return(STATUS_SUCCESS);
}
-
NTSTATUS
+NTAPI
DiskWmiFunctionControl(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
@@ -1931,10 +1944,10 @@
--*/
{
NTSTATUS status = STATUS_SUCCESS;
- PCOMMON_DEVICE_EXTENSION commonExtension = DeviceObject->DeviceExtension;
+ //PCOMMON_DEVICE_EXTENSION commonExtension = DeviceObject->DeviceExtension;
PFUNCTIONAL_DEVICE_EXTENSION fdoExtension = DeviceObject->DeviceExtension;
- PDISK_DATA diskData = (PDISK_DATA)(commonExtension->DriverData);
- ULONG enableCount;
+ //PDISK_DATA diskData = (PDISK_DATA)(commonExtension->DriverData);
+ //ULONG enableCount;
PAGED_CODE();
@@ -1994,9 +2007,8 @@
return status;
}
-
-
NTSTATUS
+NTAPI
DiskFdoQueryWmiRegInfo(
IN PDEVICE_OBJECT DeviceObject,
OUT ULONG *RegFlags,
@@ -2036,10 +2048,10 @@
--*/
{
- PFUNCTIONAL_DEVICE_EXTENSION fdoExtension = DeviceObject->DeviceExtension;
+ //PFUNCTIONAL_DEVICE_EXTENSION fdoExtension = DeviceObject->DeviceExtension;
PCOMMON_DEVICE_EXTENSION commonExtension = DeviceObject->DeviceExtension;
PDISK_DATA diskData = (PDISK_DATA)(commonExtension->DriverData);
- NTSTATUS status;
+ //NTSTATUS status;
PAGED_CODE();
@@ -2094,6 +2106,7 @@
}
NTSTATUS
+NTAPI
DiskFdoQueryWmiRegInfoEx(
IN PDEVICE_OBJECT DeviceObject,
OUT ULONG *RegFlags,
@@ -2150,8 +2163,8 @@
return(status);
}
-
NTSTATUS
+NTAPI
DiskFdoQueryWmiDataBlock(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
@@ -2383,6 +2396,7 @@
}
NTSTATUS
+NTAPI
DiskFdoSetWmiDataBlock(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
@@ -2487,6 +2501,7 @@
}
NTSTATUS
+NTAPI
DiskFdoSetWmiDataItem(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
@@ -2554,8 +2569,8 @@
return status;
}
-
NTSTATUS
+NTAPI
DiskFdoExecuteWmiMethod(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
@@ -3018,11 +3033,11 @@
return status;
}
-
#if 0
//
// Enable this to add WMI support for PDOs
NTSTATUS
+NTAPI
DiskPdoQueryWmiRegInfo(
IN PDEVICE_OBJECT DeviceObject,
OUT ULONG *RegFlags,
@@ -3088,6 +3103,7 @@
}
NTSTATUS
+NTAPI
DiskPdoQueryWmiDataBlock(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
@@ -3169,6 +3185,7 @@
}
NTSTATUS
+NTAPI
DiskPdoSetWmiDataBlock(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
@@ -3248,6 +3265,7 @@
}
NTSTATUS
+NTAPI
DiskPdoSetWmiDataItem(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
@@ -3328,8 +3346,8 @@
return status;
}
-
NTSTATUS
+NTAPI
DiskPdoExecuteWmiMethod(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
@@ -3429,6 +3447,3 @@
return status;
}
#endif
-
-
-
Modified: trunk/reactos/drivers/storage/class/disk_new/enum.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/class/disk…
==============================================================================
--- trunk/reactos/drivers/storage/class/disk_new/enum.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/storage/class/disk_new/enum.c [iso-8859-1] Sun Jul 29 02:05:26
2012
@@ -36,6 +36,7 @@
#endif
PDRIVE_LAYOUT_INFORMATION
+NTAPI
DiskConvertExtendedToLayout(
IN CONST PDRIVE_LAYOUT_INFORMATION_EX LayoutEx
)
@@ -97,6 +98,7 @@
}
VOID
+NTAPI
DiskConvertPartitionToExtended(
IN PPARTITION_INFORMATION Partition,
OUT PPARTITION_INFORMATION_EX PartitionEx
@@ -140,8 +142,8 @@
PartitionEx->Mbr.HiddenSectors = Partition->HiddenSectors;
}
-
-PDRIVE_LAYOUT_INFORMATION_EX
+PDRIVE_LAYOUT_INFORMATION_EX
+NTAPI
DiskConvertLayoutToExtended(
IN CONST PDRIVE_LAYOUT_INFORMATION Layout
)
@@ -163,7 +165,7 @@
be freed by the callee using ExFreePool.
--*/
-
+
{
ULONG i;
ULONG size;
@@ -216,9 +218,8 @@
return layoutEx;
}
-
-
NTSTATUS
+NTAPI
DiskEnumerateDevice(
IN PDEVICE_OBJECT Fdo
)
@@ -249,13 +250,13 @@
PCOMMON_DEVICE_EXTENSION commonExtension = Fdo->DeviceExtension;
PFUNCTIONAL_DEVICE_EXTENSION fdoExtension = Fdo->DeviceExtension;
- PPHYSICAL_DEVICE_EXTENSION pdoExtension = NULL;
+ //PPHYSICAL_DEVICE_EXTENSION pdoExtension = NULL;
PDISK_DATA diskData = (PDISK_DATA) commonExtension->DriverData;
- PDEVICE_OBJECT pdo = NULL;
-
- ULONG numberListElements = 0;
+ //PDEVICE_OBJECT pdo = NULL;
+
+ //ULONG numberListElements = 0;
PDRIVE_LAYOUT_INFORMATION_EX partitionList;
@@ -358,8 +359,8 @@
} // end DiskEnumerateDevice()
-
VOID
+NTAPI
DiskUpdateRemovablePartitions(
IN PDEVICE_OBJECT Fdo,
IN OUT PDRIVE_LAYOUT_INFORMATION_EX PartitionList
@@ -395,7 +396,7 @@
ULONG partitionNumber;
ULONG partitionOrdinal = 0;
- ULONG newPartitionNumber;
+ //ULONG newPartitionNumber;
PDISK_DATA pdoData;
NTSTATUS status;
@@ -586,8 +587,8 @@
return;
}
-
VOID
+NTAPI
DiskUpdatePartitions(
IN PDEVICE_OBJECT Fdo,
IN OUT PDRIVE_LAYOUT_INFORMATION_EX PartitionList
@@ -828,7 +829,7 @@
} else {
- PDEVICE_OBJECT nextPdo;
+ //PDEVICE_OBJECT nextPdo;
DebugPrint ((1, "DiskUpdatePartitions: Deleting %wZ\n",
&pdoExtension->CommonExtension.DeviceName));
@@ -1019,8 +1020,8 @@
return;
}
-
NTSTATUS
+NTAPI
DiskCreatePdo(
IN PDEVICE_OBJECT Fdo,
IN ULONG PartitionOrdinal,
@@ -1208,11 +1209,8 @@
return status;
}
-
-
-
-
VOID
+NTAPI
DiskAcquirePartitioningLock(
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension
)
@@ -1231,8 +1229,8 @@
return;
}
-
VOID
+NTAPI
DiskReleasePartitioningLock(
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension
)
Modified: trunk/reactos/drivers/storage/class/disk_new/geometry.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/class/disk…
==============================================================================
--- trunk/reactos/drivers/storage/class/disk_new/geometry.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/storage/class/disk_new/geometry.c [iso-8859-1] Sun Jul 29
02:05:26 2012
@@ -28,22 +28,26 @@
#if defined (_X86_)
DISK_GEOMETRY_SOURCE
+NTAPI
DiskUpdateGeometry(
IN PFUNCTIONAL_DEVICE_EXTENSION DeviceExtension
);
NTSTATUS
+NTAPI
DiskUpdateRemovableGeometry (
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension
);
VOID
+NTAPI
DiskScanBusDetectInfo(
IN PDRIVER_OBJECT DriverObject,
IN HANDLE BusKey
);
NTSTATUS
+NTAPI
DiskSaveBusDetectInfo(
IN PDRIVER_OBJECT DriverObject,
IN HANDLE TargetKey,
@@ -51,12 +55,14 @@
);
NTSTATUS
+NTAPI
DiskSaveGeometryDetectInfo(
IN PDRIVER_OBJECT DriverObject,
IN HANDLE HardwareKey
);
NTSTATUS
+NTAPI
DiskGetPortGeometry(
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
OUT PDISK_GEOMETRY Geometry
@@ -94,8 +100,8 @@
#endif
-
NTSTATUS
+NTAPI
DiskSaveDetectInfo(
PDRIVER_OBJECT DriverObject
)
@@ -208,8 +214,8 @@
return STATUS_SUCCESS;
}
-
VOID
+NTAPI
DiskCleanupDetectInfo(
IN PDRIVER_OBJECT DriverObject
)
@@ -237,8 +243,8 @@
return;
}
-
NTSTATUS
+NTAPI
DiskSaveGeometryDetectInfo(
IN PDRIVER_OBJECT DriverObject,
IN HANDLE HardwareKey
@@ -363,8 +369,8 @@
return STATUS_SUCCESS;
}
-
VOID
+NTAPI
DiskScanBusDetectInfo(
IN PDRIVER_OBJECT DriverObject,
IN HANDLE BusKey
@@ -520,8 +526,8 @@
return;
}
-
NTSTATUS
+NTAPI
DiskSaveBusDetectInfo(
IN PDRIVER_OBJECT DriverObject,
IN HANDLE TargetKey,
@@ -681,8 +687,8 @@
return STATUS_SUCCESS;
}
-
DISK_GEOMETRY_SOURCE
+NTAPI
DiskUpdateGeometry(
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension
)
@@ -769,7 +775,7 @@
ULONG sectorsPerTrack;
ULONG tracksPerCylinder;
- ULONG sectors;
+ //ULONG sectors;
ULONG length;
//
@@ -882,8 +888,8 @@
return diskData->GeometrySource;
}
-
NTSTATUS
+NTAPI
DiskUpdateRemovableGeometry (
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension
)
@@ -941,8 +947,8 @@
return status;
}
-
NTSTATUS
+NTAPI
DiskGetPortGeometry(
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
OUT PDISK_GEOMETRY Geometry
@@ -1019,9 +1025,8 @@
return status;
}
-
-
NTSTATUS
+NTAPI
DiskReadDriveCapacity(
IN PDEVICE_OBJECT Fdo
)
@@ -1049,8 +1054,8 @@
{
PFUNCTIONAL_DEVICE_EXTENSION fdoExtension = Fdo->DeviceExtension;
- PDISK_DATA diskData = fdoExtension->CommonExtension.DriverData;
- DISK_GEOMETRY_SOURCE diskGeometrySource = DiskGeometryUnknown;
+ //PDISK_DATA diskData = fdoExtension->CommonExtension.DriverData;
+ //DISK_GEOMETRY_SOURCE diskGeometrySource = DiskGeometryUnknown;
NTSTATUS status;
ASSERT_FDO(Fdo);
@@ -1058,7 +1063,7 @@
if (TEST_FLAG(Fdo->Characteristics, FILE_REMOVABLE_MEDIA)) {
DiskUpdateRemovableGeometry(fdoExtension);
} else {
- diskGeometrySource = DiskUpdateGeometry(fdoExtension);
+ /* diskGeometrySource =*/ DiskUpdateGeometry(fdoExtension);
}
status = ClassReadDriveCapacity(Fdo);
@@ -1066,9 +1071,8 @@
return status;
}
-
-
VOID
+NTAPI
DiskDriverReinitialization(
IN PDRIVER_OBJECT DriverObject,
IN PVOID Nothing,
@@ -1238,7 +1242,7 @@
ULONG sectorsPerTrack;
ULONG tracksPerCylinder;
- ULONG sectors;
+ //ULONG sectors;
ULONG length;
//
@@ -1321,8 +1325,8 @@
return;
}
-
NTSTATUS
+NTAPI
DiskGetDetectInfo(
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
OUT PDISK_DETECTION_INFO DetectInfo
@@ -1408,8 +1412,8 @@
return (found ? STATUS_SUCCESS : STATUS_UNSUCCESSFUL);
}
-
NTSTATUS
+NTAPI
DiskReadSignature(
IN PDEVICE_OBJECT Fdo
)
@@ -1466,5 +1470,3 @@
}
#endif // defined(_X86_)
-
-
Modified: trunk/reactos/drivers/storage/class/disk_new/part.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/class/disk…
==============================================================================
--- trunk/reactos/drivers/storage/class/disk_new/part.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/storage/class/disk_new/part.c [iso-8859-1] Sun Jul 29 02:05:26
2012
@@ -45,6 +45,7 @@
#endif
NTSTATUS
+NTAPI
DiskReadPartitionTableEx(
IN PFUNCTIONAL_DEVICE_EXTENSION Fdo,
IN BOOLEAN BypassCache,
@@ -193,8 +194,8 @@
return status;
}
-
-NTSTATUS
+NTSTATUS
+NTAPI
DiskWritePartitionTableEx(
IN PFUNCTIONAL_DEVICE_EXTENSION Fdo,
IN PDRIVE_LAYOUT_INFORMATION_EX DriveLayout
@@ -240,6 +241,7 @@
}
NTSTATUS
+NTAPI
DiskSetPartitionInformationEx(
IN PFUNCTIONAL_DEVICE_EXTENSION Fdo,
IN ULONG PartitionNumber,
@@ -264,6 +266,7 @@
}
NTSTATUS
+NTAPI
DiskSetPartitionInformation(
IN PFUNCTIONAL_DEVICE_EXTENSION Fdo,
IN ULONG SectorSize,
@@ -284,6 +287,7 @@
}
BOOLEAN
+NTAPI
DiskInvalidatePartitionTable(
IN PFUNCTIONAL_DEVICE_EXTENSION Fdo,
IN BOOLEAN PartitionLockHeld
@@ -309,6 +313,7 @@
}
NTSTATUS
+NTAPI
DiskVerifyPartitionTable(
IN PFUNCTIONAL_DEVICE_EXTENSION Fdo,
IN BOOLEAN FixErrors
@@ -324,4 +329,3 @@
return IoVerifyPartitionTable(Fdo->DeviceObject, FixErrors);
}
-
Modified: trunk/reactos/drivers/storage/class/disk_new/pnp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/class/disk…
==============================================================================
--- trunk/reactos/drivers/storage/class/disk_new/pnp.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/storage/class/disk_new/pnp.c [iso-8859-1] Sun Jul 29 02:05:26
2012
@@ -39,8 +39,8 @@
#endif
-
NTSTATUS
+NTAPI
DiskAddDevice(
IN PDRIVER_OBJECT DriverObject,
IN PDEVICE_OBJECT PhysicalDeviceObject
@@ -185,9 +185,8 @@
} // end DiskAddDevice()
-
-
NTSTATUS
+NTAPI
DiskInitFdo(
IN PDEVICE_OBJECT Fdo
)
@@ -214,16 +213,16 @@
PDISK_DATA diskData = (PDISK_DATA) fdoExtension->CommonExtension.DriverData;
- ULONG srbFlags = 0;
+ //ULONG srbFlags = 0;
ULONG timeOut = 0;
ULONG bytesPerSector;
- UCHAR sectorShift;
-
- BOOLEAN dmActive = FALSE;
+ //UCHAR sectorShift;
+
+ //BOOLEAN dmActive = FALSE;
PULONG dmSkew;
- ULONG dmByteSkew;
+ //ULONG dmByteSkew;
NTSTATUS status;
@@ -279,7 +278,7 @@
DiskScanRegistryForSpecial(fdoExtension);
- srbFlags = fdoExtension->SrbFlags;
+ //srbFlags = fdoExtension->SrbFlags;
//
// Clear buffer for drive geometry.
@@ -413,7 +412,7 @@
bytesPerSector = fdoExtension->DiskGeometry.BytesPerSector = 512;
}
- sectorShift = fdoExtension->SectorShift;
+ //sectorShift = fdoExtension->SectorShift;
//
// Determine is DM Driver is loaded on an IDE drive that is
@@ -443,8 +442,8 @@
// blown away.
//
- dmActive = TRUE;
- dmByteSkew = fdoExtension->DMByteSkew;
+ //dmActive = TRUE;
+ //dmByteSkew = fdoExtension->DMByteSkew;
}
@@ -557,8 +556,8 @@
} // end DiskInitFdo()
-
NTSTATUS
+NTAPI
DiskInitPdo(
IN PDEVICE_OBJECT Pdo
)
@@ -615,8 +614,8 @@
return STATUS_SUCCESS;
}
-
NTSTATUS
+NTAPI
DiskStartPdo(
IN PDEVICE_OBJECT Pdo
)
@@ -637,6 +636,7 @@
}
NTSTATUS
+NTAPI
DiskStopDevice(
IN PDEVICE_OBJECT DeviceObject,
IN UCHAR Type
@@ -654,8 +654,8 @@
return STATUS_SUCCESS;
}
-
NTSTATUS
+NTAPI
DiskQueryId(
IN PDEVICE_OBJECT Pdo,
IN BUS_QUERY_ID_TYPE IdType,
@@ -695,7 +695,7 @@
{
ANSI_STRING ansiIdString;
- NTSTATUS status;
+ //NTSTATUS status;
PAGED_CODE();
ASSERT_PDO(Pdo);
@@ -715,7 +715,7 @@
if(IdType == BusQueryInstanceID) {
- PPHYSICAL_DEVICE_EXTENSION pdoExtension = Pdo->DeviceExtension;
+ //PPHYSICAL_DEVICE_EXTENSION pdoExtension = Pdo->DeviceExtension;
PCOMMON_DEVICE_EXTENSION commonExtension = Pdo->DeviceExtension;
PDISK_DATA diskData =
commonExtension->PartitionZeroExtension->CommonExtension.DriverData;
@@ -778,8 +778,8 @@
return STATUS_NOT_IMPLEMENTED;
}
-
NTSTATUS
+NTAPI
DiskGenerateDeviceName(
IN BOOLEAN IsFdo,
IN ULONG DeviceNumber,
@@ -859,8 +859,8 @@
return STATUS_SUCCESS;
}
-
VOID
+NTAPI
DiskCreateSymbolicLinks(
IN PDEVICE_OBJECT DeviceObject
)
@@ -983,8 +983,8 @@
return;
}
-
VOID
+NTAPI
DiskDeleteSymbolicLinks(
IN PDEVICE_OBJECT DeviceObject
)
@@ -1049,8 +1049,8 @@
return;
}
-
NTSTATUS
+NTAPI
DiskRemoveDevice(
IN PDEVICE_OBJECT DeviceObject,
IN UCHAR Type
@@ -1132,7 +1132,7 @@
} else {
- PPHYSICAL_DEVICE_EXTENSION pdoExtension = DeviceObject->DeviceExtension;
+ //PPHYSICAL_DEVICE_EXTENSION pdoExtension = DeviceObject->DeviceExtension;
}
@@ -1157,8 +1157,8 @@
return STATUS_SUCCESS;
}
-
NTSTATUS
+NTAPI
DiskStartFdo(
IN PDEVICE_OBJECT Fdo
)
@@ -1400,4 +1400,3 @@
return STATUS_SUCCESS;
} // end DiskStartFdo()
-