21#define AUTO_DRIVE MAXULONG
23#define PARTITION_MAGIC 0xaa55
25#define EFI_PMBR_OSTYPE_EFI 0xEE
239 if (LayoutInfo ==
NULL)
260 &PARTITION_BASIC_DATA_GUID,
287 if (LayoutInfo ==
NULL)
294 for (
i = 0;
i < 4; ++
i)
297 if (LayoutInfo->PartitionEntry[
i].StartingOffset.QuadPart ==
PartitionInfo.StartingOffset.QuadPart)
342 sizeof(
ULONG) * DiskCount,
350 for (
i = 0;
i < DiskCount; ++
i)
406 for (
i = 0;
i < DiskCount; ++
i)
409 for (
j = 0;
j < DiskCount; ++
j)
421 while (Devices[
k] != -1)
423 if (++
k >= DiskCount)
626 if (NtDeviceName ==
NULL || NtSystemPath ==
NULL)
658 for (
i = DriveLetter;
i <=
'Z'; ++
i)
678 for (
i = DriveLetter;
i <=
'Z'; ++
i)
927 PSTR Buffer1, Buffer2, LoadOptions;
944 if (Buffer1 ==
NULL || Buffer2 ==
NULL)
955 Last =
strrchr(LoaderBlock->NtBootPathName,
'\\');
969 Last =
strrchr(LoaderBlock->NtBootPathName,
'\\');
980 NtSystemPath[0] =
'X';
981 NtSystemPath[1] =
':';
999 for (
i = 0;
i < DiskCount; ++
i)
1002 sprintf(Buffer1,
"\\Device\\Harddisk%d\\Partition%d",
i, 0);
1025 sprintf(Buffer2,
"\\DosDevices\\PhysicalDrive%d",
i);
1036 RealDiskCount =
i + 1;
1057 if (LoaderBlock->LoadOptions !=
NULL)
1059 LoadOptions =
_strupr(LoaderBlock->LoadOptions);
1067 if (LoadOptions !=
NULL &&
1068 strstr(LoadOptions,
"MININT") != 0 &&
1073 *NtSystemPath =
'X';
1081 if (RealDiskCount > DiskCount)
1083 DiskCount = RealDiskCount;
1091 for (
i = 0;
i < DiskCount; ++
i)
1094 if (Devices !=
NULL)
1096 HarddiskCount = Devices[
i];
1108 SystemFound =
FALSE;
1109 swprintf(
Buffer,
L"\\Device\\Harddisk%d\\Partition%d", HarddiskCount, 1);
1115 for (PartitionCount = 1; ; ++PartitionCount)
1117 swprintf(
Buffer,
L"\\Device\\Harddisk%d\\Partition%d", HarddiskCount, PartitionCount);
1135 for (PartitionCount = 2; ; ++PartitionCount)
1151 swprintf(
Buffer,
L"\\Device\\Harddisk%d\\Partition%d", HarddiskCount, PartitionCount);
1158 for (PartitionCount = 1; ; ++PartitionCount)
1160 swprintf(
Buffer,
L"\\Device\\Harddisk%d\\Partition%d", HarddiskCount, PartitionCount);
1181 if (LayoutInfo !=
NULL)
1186 HarddiskCount =
i + 1;
1190 for (
i = 0;
i < DiskCount; ++
i)
1193 if (Devices !=
NULL)
1195 HarddiskCount = Devices[
i];
1211 for (PartitionCount = 1; ; ++PartitionCount)
1213 swprintf(
Buffer,
L"\\Device\\Harddisk%d\\Partition%d", HarddiskCount, PartitionCount);
1227 if (LayoutInfo !=
NULL)
1234 for (
i = 0;
i < DiskCount; ++
i)
1237 if (Devices !=
NULL)
1239 HarddiskCount = Devices[
i];
1256 for (PartitionCount = 1; ; ++PartitionCount)
1258 swprintf(
Buffer,
L"\\Device\\Harddisk%d\\Partition%d", HarddiskCount, PartitionCount);
1272 for (PartitionCount = 1; ; ++PartitionCount)
1276 swprintf(
Buffer,
L"\\Device\\Harddisk%d\\Partition%d", HarddiskCount, PartitionCount);
1280 if (LayoutInfo !=
NULL)
1297 if (Devices !=
NULL)
1326 if (DriveLetter != 0)
1328 if (DriveLetter != 0xFF)
1330 *NtSystemPath = DriveLetter;
1357 if (DriveLetter >
'Z')
1364 if (DriveLetter >
'Z')
1369 *NtSystemPath =
'Z';
1374 *NtSystemPath = DriveLetter;
1455 if (EndingSector > MaxSector)
1458 DPRINT1(
"FSTUB: entry is invalid\n");
1461 DPRINT1(
"FSTUB: end %#I64x\n", EndingSector);
1462 DPRINT1(
"FSTUB: max %#I64x\n", MaxSector);
1468 DPRINT1(
"FSTUB: entry is invalid\n");
1471 DPRINT1(
"FSTUB: end %#I64x\n", EndingSector);
1472 DPRINT1(
"FSTUB: maxOffset %#I64x\n", MaxOffset);
1487 IN ULONG ConventionalCylinders,
1492 ULONG StartingCylinder, EndingCylinder;
1493 ULONG StartingTrack, EndingTrack;
1494 ULONG StartingSector, EndingSector;
1501 FirstSector.
QuadPart = PartitionOffset->QuadPart >> ShiftCount;
1502 SectorCount.QuadPart = PartitionLength->QuadPart >> ShiftCount;
1508 StartingCylinder = FirstSector.
LowPart / SectorsPerCylinder;
1509 EndingCylinder = LastSector / SectorsPerCylinder;
1512 if (!ConventionalCylinders) ConventionalCylinders = 1024;
1515 if (StartingCylinder >= ConventionalCylinders)
1518 StartingCylinder = ConventionalCylinders - 1;
1520 if (EndingCylinder >= ConventionalCylinders)
1523 EndingCylinder = ConventionalCylinders - 1;
1532 Remainder = LastSector % SectorsPerCylinder;
1537 PartitionDescriptor->StartingCylinderMsb = (
UCHAR)StartingCylinder;
1538 PartitionDescriptor->EndingCylinderMsb = (
UCHAR)EndingCylinder;
1541 PartitionDescriptor->StartingTrack = (
UCHAR)StartingTrack;
1542 PartitionDescriptor->EndingTrack = (
UCHAR)EndingTrack;
1545 StartingCylinder = ((StartingSector + 1) & 0x3F) |
1546 ((StartingCylinder >> 2) & 0xC0);
1547 EndingCylinder = ((EndingSector + 1) & 0x3F) |
1548 ((EndingCylinder >> 2) & 0xC0);
1551 PartitionDescriptor->StartingCylinderLsb = (
UCHAR)StartingCylinder;
1552 PartitionDescriptor->EndingCylinderLsb = (
UCHAR)EndingCylinder;
1568 *ConventionalCylinders = 0;
1575 if (!DiskGeometry)
goto Cleanup;
1623 *ConventionalCylinders = 1024;
1718 if (PartitionDescriptor->
PartitionType != MbrTypeIdentifier)
1752 ULONG PartitionMaxOffset, PartitionLength;
1758 if (PartitionMaxOffset > MaxOffset)
1785 LONGLONG EndSector, MaxSector, StartOffset;
1828 MaxSector = EndSector << 1;
1829 DPRINT(
"FSTUB: DiskSize = %#I64x, MaxSector = %#I64x\n",
1830 DiskGeometryEx.
DiskSize, MaxSector);
1885 if (IsEzDrive && (
Offset.QuadPart == 512))
Offset.QuadPart = 0;
1891 DPRINT1(
"FSTUB: (IoReadPartitionTable) No 0xaa55 found in "
1892 "partition table %d\n",
j + 1);
1911 DPRINT(
"FSTUB: Partition Table %d:\n",
j);
1918 DPRINT(
"Partition Entry %d,%d: type %#x %s\n",
1922 (PartitionDescriptor->
ActiveFlag) ?
"Active" :
"");
1923 DPRINT(
"\tOffset %#08lx for %#08lx Sectors\n",
1937 MaxSector)) && (
j == 0))
1951 DPRINT1(
"FSTUB: Multiple container partitions found in "
1952 "partition table %d\n - table is invalid\n",
1992 if (!DriveLayoutInfo)
2031 StartOffset = VolumeOffset.
QuadPart;
2037 StartOffset =
Offset.QuadPart;
2105 if (IsPrimary) VolumeOffset =
Offset;
2109 DPRINT1(
"FSTUB: MaxSector now = %I64d\n", MaxSector);
2120 (
j == 0) && (MbrFound) && (
IsEmpty))
2125 if ((BootSectorInfo->
JumpByte[0] == 0xeb) ||
2126 (BootSectorInfo->
JumpByte[0] == 0xe9))
2129 DPRINT1(
"FSTUB: Jump byte %#x found along with empty partition "
2130 "table - disk is a super floppy and has no valid MBR\n",
2143 DPRINT1(
"FSTUB: Drive %#p has no valid MBR. Make it into a "
2146 DPRINT1(
"FSTUB: Drive has %I64d sectors and is %#016I64x "
2148 EndSector, DiskGeometryEx.
DiskSize);
2169 (*PartitionBuffer)->Signature = 1;
2181 (*PartitionBuffer)->PartitionCount = ++
i;
2184 if (!
i) (*PartitionBuffer)->Signature = 0;
2279 if (IsEzDrive && (
Offset.QuadPart == 512))
Offset.QuadPart = 0;
2363 if (IsPrimary) VolumeOffset =
Offset;
2406 ULONG ConventionalCylinders;
2512 if (IsEzDrive && (
Offset.QuadPart == 512))
Offset.QuadPart = 0;
2588 ConventionalCylinders,
2595 Entry[
j].StartingSector = 0;
2596 Entry[
j].PartitionLength = 0;
2597 Entry[
j].StartingTrack = 0;
2598 Entry[
j].EndingTrack = 0;
2599 Entry[
j].StartingCylinder = 0;
2600 Entry[
j].EndingCylinder = 0;
2623 if (IsEzDrive && !
Offset.QuadPart)
Offset.QuadPart = 512;
2661 if (IsEzDrive && (
Offset.QuadPart == 512))
Offset.QuadPart = 0;
2666 if (IsMbr) ExtendedOffset = NextOffset;
2755 NtSystemPathString);
char * strstr(char *String1, char *String2)
ACPI_SIZE strlen(const char *String)
char * strcpy(char *DstString, const char *SrcString)
PPARTENTRY SystemPartition
#define PARTITION_ENTRY_UNUSED
DECLSPEC_NORETURN VOID NTAPI KeBugCheck(ULONG BugCheckCode)
_In_ PFCB _In_ LONGLONG StartingOffset
#define IOCTL_DISK_GET_DRIVE_GEOMETRY
_In_ PCHAR _In_ ULONG DeviceNumber
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
NTSTATUS FASTCALL IoReadPartitionTable(IN PDEVICE_OBJECT DeviceObject, IN ULONG SectorSize, IN BOOLEAN ReturnRecognizedPartitions, IN OUT PDRIVE_LAYOUT_INFORMATION *PartitionBuffer)
enum _PARTITION_TYPE PARTITION_TYPE
VOID FASTCALL IoAssignDriveLetters(IN PLOADER_PARAMETER_BLOCK LoaderBlock, IN PSTRING NtDeviceName, OUT PUCHAR NtSystemPath, OUT PSTRING NtSystemPathString)
NTSTATUS HalpDeleteMountLetter(UCHAR DriveLetter)
struct _REG_DISK_MOUNT_INFO * PREG_DISK_MOUNT_INFO
enum _PARTITION_TYPE * PPARTITION_TYPE
NTSTATUS FASTCALL xHalIoReadPartitionTable(IN PDEVICE_OBJECT DeviceObject, IN ULONG SectorSize, IN BOOLEAN ReturnRecognizedPartitions, IN OUT PDRIVE_LAYOUT_INFORMATION *PartitionBuffer)
PULONG IopComputeHarddiskDerangements(IN ULONG DiskCount)
VOID FASTCALL xHalIoAssignDriveLetters(IN PLOADER_PARAMETER_BLOCK LoaderBlock, IN PSTRING NtDeviceName, OUT PUCHAR NtSystemPath, OUT PSTRING NtSystemPathString)
NTSTATUS HalpQueryPartitionType(IN PUNICODE_STRING DeviceName, IN PDRIVE_LAYOUT_INFORMATION LayoutInfo, OUT PPARTITION_TYPE PartitionType)
NTSTATUS NTAPI HalpGetFullGeometry(IN PDEVICE_OBJECT DeviceObject, OUT PDISK_GEOMETRY_EX Geometry)
BOOLEAN HalpIsOldStyleFloppy(PUNICODE_STRING DeviceName)
NTSTATUS HalpSetMountLetter(IN PUNICODE_STRING DeviceName, UCHAR DriveLetter)
UCHAR HalpNextDriveLetter(IN PUNICODE_STRING DeviceName, IN PSTRING NtDeviceName, OUT PUCHAR NtSystemPath, BOOLEAN IsRemovable)
VOID NTAPI HalpCalculateChsValues(IN PLARGE_INTEGER PartitionOffset, IN PLARGE_INTEGER PartitionLength, IN CCHAR ShiftCount, IN ULONG SectorsPerTrack, IN ULONG NumberOfTracks, IN ULONG ConventionalCylinders, OUT PPARTITION_DESCRIPTOR PartitionDescriptor)
VOID FASTCALL xHalGetPartialGeometry(IN PDEVICE_OBJECT DeviceObject, IN PULONG ConventionalCylinders, IN PLONGLONG DiskSize)
NTSTATUS FASTCALL IoWritePartitionTable(IN PDEVICE_OBJECT DeviceObject, IN ULONG SectorSize, IN ULONG SectorsPerTrack, IN ULONG NumberOfHeads, IN PDRIVE_LAYOUT_INFORMATION PartitionBuffer)
const WCHAR DiskMountString[]
NTSTATUS HalpNextMountLetter(IN PUNICODE_STRING DeviceName, OUT PUCHAR DriveLetter)
VOID NTAPI FstubFixupEfiPartition(IN PPARTITION_DESCRIPTOR PartitionDescriptor, IN ULONGLONG MaxOffset)
VOID FASTCALL xHalExamineMBR(IN PDEVICE_OBJECT DeviceObject, IN ULONG SectorSize, IN ULONG MbrTypeIdentifier, OUT PVOID *MbrBuffer)
NTSTATUS FASTCALL xHalIoSetPartitionInformation(IN PDEVICE_OBJECT DeviceObject, IN ULONG SectorSize, IN ULONG PartitionNumber, IN ULONG PartitionType)
#define EFI_PMBR_OSTYPE_EFI
NTSTATUS FASTCALL HalpQueryDriveLayout(IN PUNICODE_STRING DeviceName, OUT PDRIVE_LAYOUT_INFORMATION *LayoutInfo)
BOOLEAN NTAPI HalpIsValidPartitionEntry(IN PPARTITION_DESCRIPTOR Entry, IN ULONGLONG MaxOffset, IN ULONGLONG MaxSector)
enum _DISK_MANAGER DISK_MANAGER
struct _REG_DISK_MOUNT_INFO REG_DISK_MOUNT_INFO
VOID HalpEnableAutomaticDriveLetterAssignment(VOID)
NTSTATUS FASTCALL IoSetPartitionInformation(IN PDEVICE_OBJECT DeviceObject, IN ULONG SectorSize, IN ULONG PartitionNumber, IN ULONG PartitionType)
NTSTATUS FASTCALL xHalIoWritePartitionTable(IN PDEVICE_OBJECT DeviceObject, IN ULONG SectorSize, IN ULONG SectorsPerTrack, IN ULONG NumberOfHeads, IN PDRIVE_LAYOUT_INFORMATION PartitionBuffer)
#define NT_SUCCESS(StatCode)
static const WCHAR Cleanup[]
#define ExAllocatePoolWithTag(hernya, size, tag)
#define KeWaitForSingleObject(pEvt, foo, a, b, c)
#define RtlCompareMemory(s1, s2, l)
#define KeInitializeEvent(pEvt, foo, foo2)
#define NonPagedPoolCacheAligned
VOID NTAPI KeClearEvent(IN PKEVENT Event)
#define BooleanFlagOn(F, SF)
IN OUT PLONG IN OUT PLONG Addend IN OUT PLONG IN LONG Increment
#define IOCTL_DISK_GET_DRIVE_GEOMETRY_EX
#define IOCTL_DISK_GET_PARTITION_INFO_EX
_Must_inspect_result_ _In_opt_ PFLT_INSTANCE _Out_ PHANDLE FileHandle
#define FILE_SYNCHRONOUS_IO_NONALERT
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
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 GLint GLint j
#define OBJ_CASE_INSENSITIVE
#define UInt32x32To64(a, b)
PCONFIGURATION_INFORMATION NTAPI IoGetConfigurationInformation(VOID)
Returns a pointer to the I/O manager's global configuration information structure.
#define ExFreePoolWithTag(_P, _T)
#define IOCTL_MOUNTMGR_DELETE_POINTS
#define IOCTL_MOUNTDEV_QUERY_DEVICE_NAME
struct _MOUNTMGR_CREATE_POINT_INPUT MOUNTMGR_CREATE_POINT_INPUT
struct _MOUNTMGR_MOUNT_POINT MOUNTMGR_MOUNT_POINT
#define IOCTL_MOUNTMGR_CREATE_POINT
#define sprintf(buf, format,...)
static OUT PIO_STATUS_BLOCK IoStatusBlock
#define InitializeObjectAttributes(p, n, a, r, s)
#define IOCTL_MOUNTMGR_AUTO_DL_ASSIGNMENTS
#define IOCTL_MOUNTMGR_NEXT_DRIVE_LETTER
NTSYSAPI NTSTATUS NTAPI ZwOpenFile(_Out_ PHANDLE FileHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes, _Out_ PIO_STATUS_BLOCK IoStatusBlock, _In_ ULONG ShareAccess, _In_ ULONG OpenOptions)
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
NTSYSAPI VOID NTAPI RtlInitString(PSTRING DestinationString, PCSZ SourceString)
#define FILE_READ_ATTRIBUTES
NTSYSAPI NTSTATUS NTAPI RtlAnsiStringToUnicodeString(PUNICODE_STRING DestinationString, PANSI_STRING SourceString, BOOLEAN AllocateDestinationString)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSYSAPI BOOLEAN NTAPI RtlEqualUnicodeString(PUNICODE_STRING String1, PUNICODE_STRING String2, BOOLEAN CaseInSensitive)
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
NTSYSAPI BOOLEAN NTAPI RtlPrefixUnicodeString(IN PUNICODE_STRING String1, IN PUNICODE_STRING String2, IN BOOLEAN CaseInSensitive)
NTSYSAPI VOID NTAPI RtlInitAnsiString(PANSI_STRING DestinationString, PCSZ SourceString)
#define FILE_REMOVABLE_MEDIA
__GNU_EXTENSION typedef __int64 * PLONGLONG
#define IsFTPartition(PartitionType)
#define PARTITION_EZDRIVE
#define IsContainerPartition(PartitionType)
#define IsRecognizedPartition(PartitionType)
#define IOCTL_DISK_GET_DRIVE_LAYOUT
_In_ ULONG _In_ ULONG Offset
#define IOCTL_STORAGE_GET_DEVICE_NUMBER
BOOLEAN IoRemoteBootClient
struct _PARTITION_DESCRIPTOR * PPARTITION_DESCRIPTOR
struct _DISK_LAYOUT * PDISK_LAYOUT
#define PARTITION_TABLE_OFFSET
#define BOOT_SIGNATURE_OFFSET
#define DISK_SIGNATURE_OFFSET
#define SET_PARTITION_LENGTH(p, l)
#define GET_PARTITION_LENGTH(p)
#define GET_STARTING_SECTOR(p)
struct _BOOT_SECTOR_INFO * PBOOT_SECTOR_INFO
#define NUM_PARTITION_TABLE_ENTRIES
NTSTATUS NTAPI IoGetDeviceObjectPointer(IN PUNICODE_STRING ObjectName, IN ACCESS_MASK DesiredAccess, OUT PFILE_OBJECT *FileObject, OUT PDEVICE_OBJECT *DeviceObject)
PDEVICE_OBJECT NTAPI IoGetAttachedDeviceReference(PDEVICE_OBJECT DeviceObject)
PIRP NTAPI IoBuildSynchronousFsdRequest(IN ULONG MajorFunction, IN PDEVICE_OBJECT DeviceObject, IN PVOID Buffer, IN ULONG Length, IN PLARGE_INTEGER StartingOffset, IN PKEVENT Event, IN PIO_STATUS_BLOCK IoStatusBlock)
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 NTAPI IoCreateSymbolicLink(IN PUNICODE_STRING SymbolicLinkName, IN PUNICODE_STRING DeviceName)
#define STATUS_BAD_MASTER_BOOT_RECORD
#define BOOT_RECORD_SIGNATURE
_CRT_RESTORE_GCC_WARNINGS _CRT_DISABLE_GCC_WARNINGS _Check_return_ _CRTIMP _CONST_RETURN char *__cdecl strrchr(_In_z_ const char *_Str, _In_ int _Ch)
_CRTIMP char *__cdecl _strupr(_Inout_z_ char *_String)
BOOLEAN IsSuperFloppy(_In_ PDISKENTRY DiskEntry)
#define STATUS_BUFFER_TOO_SMALL
#define STATUS_BUFFER_OVERFLOW
base of all file and directory entries
PARTITION_TABLE PartitionTable[1]
PARTITION_INFORMATION PartitionEntry[4]
LARGE_INTEGER StartingOffset
#define FIELD_OFFSET(t, f)
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define RtlMoveMemory(Destination, Source, Length)
#define STATUS_INVALID_PARAMETER
#define STATUS_NO_DATA_DETECTED
#define STATUS_INSUFFICIENT_RESOURCES
_In_ PDEVICE_OBJECT DeviceObject
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
_In_ WDFREQUEST _In_ size_t _In_ size_t InputBufferLength
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR OutputBuffer
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR InputBuffer
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetNextIrpStackLocation(_In_ PIRP Irp)
_In_ ULONG _In_ ULONG _In_ ULONG NumberOfHeads
_In_ ULONG _In_ BOOLEAN ReturnRecognizedPartitions
_In_ ULONG _In_ ULONG SectorsPerTrack
_In_ ULONG _In_ struct _SET_PARTITION_INFORMATION_EX * PartitionInfo
_In_ ULONG _In_ BOOLEAN _Out_ struct _DRIVE_LAYOUT_INFORMATION ** PartitionBuffer
_In_ ULONG _In_ ULONG PartitionNumber
#define SL_OVERRIDE_VERIFY_VOLUME
_Must_inspect_result_ typedef _In_ ULONG TableEntry
#define POOL_COLD_ALLOCATION
#define ObDereferenceObject
_In_ LARGE_INTEGER _Out_opt_ PLARGE_INTEGER Remainder