86{
101
103
106
108 if (IsCdRom)
109 {
111 MbrSectorSize = 2048;
112 }
113 else
114 {
116 MbrSectorSize = 512;
117 }
118
119
121 {
122 ERR(
"Reading MBR failed\n");
124 }
125
128
131
132
133 Checksum = 0;
134 for (
i = 0;
i < MbrSectorSize /
sizeof(
ULONG);
i++)
135 {
137 }
138 Checksum = ~Checksum + 1;
139 TRACE(
"Checksum: %x\n", Checksum);
140
142 TRACE(
"IsPartitionValid: %s\n", ValidPartitionTable ?
"TRUE" :
"FALSE");
143
144
145
146
147
149 {
152 }
153
154
156 {
159 }
160 if (GptDiskGuid)
161 {
164 }
165
166
168 Checksum, ValidPartitionTable);
169
170 if (pChecksum)
171 *pChecksum = Checksum;
172 if (pSignature)
174 if (pValidPartitionTable)
175 *pValidPartitionTable = ValidPartitionTable;
176
177
180
181
187
188
190
191
194 {
196 {
203 }
205 }
206
208}
VOID AddReactOSArcDiskInfo(_In_ PCSTR ArcName, _In_opt_ PGUID GptDiskGuid, _In_ ULONG Signature, _In_ ULONG Checksum, _In_ BOOLEAN ValidPartitionTable)
BOOLEAN DiskReadGptHeader(_In_ UCHAR DriveNumber, _Out_ PGPT_TABLE_HEADER GptHeader)
#define GUID_ELEMENTS(Guid)
VOID DiskDetectPartitionType(_In_ UCHAR DriveNumber)
BOOLEAN DiskGetPartitionEntry(_In_ UCHAR DriveNumber, _In_opt_ ULONG SectorSize, _In_ ULONG PartitionNumber, _Out_ PPARTITION_INFORMATION PartitionEntry)
BOOLEAN FsRegisterDevice(_In_ PCSTR DeviceName, _In_ const DEVVTBL *FuncTable)
#define MachDiskGetDriveGeometry(Drive, Geom)
#define MachDiskReadLogicalSectors(Drive, Start, Count, Buf)
#define NT_SUCCESS(StatCode)
static const WCHAR Signature[]
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
#define PARTITION_ENTRY_UNUSED
struct _MASTER_BOOT_RECORD * PMASTER_BOOT_RECORD
ULONG BytesPerSector
Number of bytes per sector.
USHORT MasterBootRecordMagic
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName