ReactOS 0.4.16-dev-1972-gf20c09f
create.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS DiskPart
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: base/system/diskpart/create.c
5 * PURPOSE: Manages all the partitions of the OS in an interactive way.
6 * PROGRAMMERS: Lee Schroeder
7 */
8
9#include "diskpart.h"
10
11#define NDEBUG
12#include <debug.h>
13
14
15BOOL
19{
20 PPARTENTRY PartEntry, NewPartEntry;
21 PLIST_ENTRY ListEntry;
22 ULONGLONG ullSize = 0ULL;
23 ULONGLONG ullSectorCount;
24#if 0
25 ULONGLONG ullOffset = 0ULL;
26 BOOL bNoErr = FALSE;
27#endif
28 INT i;
29 PWSTR pszSuffix = NULL;
31
32 if (CurrentDisk == NULL)
33 {
35 return TRUE;
36 }
37
39 {
41 return TRUE;
42 }
43 else if (CurrentDisk->PartitionStyle == PARTITION_STYLE_RAW)
44 {
45 /* FIXME: Initialize disk properly! */
47 }
48
49 for (i = 3; i < argc; i++)
50 {
51 if (HasPrefix(argv[i], L"size=", &pszSuffix))
52 {
53 /* size=<N> (MB) */
54 DPRINT("Size : %s\n", pszSuffix);
55
56 ullSize = _wcstoui64(pszSuffix, NULL, 10);
57 if ((ullSize == 0) && (errno == ERANGE))
58 {
60 return TRUE;
61 }
62 }
63 else if (HasPrefix(argv[i], L"offset=", &pszSuffix))
64 {
65 /* offset=<N> (KB) */
66 DPRINT("Offset : %s\n", pszSuffix);
67 ConPuts(StdOut, L"The OFFSET option is not supported yet!\n");
68#if 0
69 ullOffset = _wcstoui64(pszSuffix, NULL, 10);
70 if ((ullOffset == 0) && (errno == ERANGE))
71 {
73 return TRUE;
74 }
75#endif
76 }
77 else if (HasPrefix(argv[i], L"align=", &pszSuffix))
78 {
79 /* align=<N> */
80 DPRINT("Align : %s\n", pszSuffix);
81 ConPuts(StdOut, L"The ALIGN option is not supported yet!\n");
82#if 0
83 bAlign = TRUE;
84#endif
85 }
86 else if (_wcsicmp(argv[i], L"noerr") == 0)
87 {
88 /* noerr */
89 DPRINT("NoErr\n", pszSuffix);
90 ConPuts(StdOut, L"The NOERR option is not supported yet!\n");
91#if 0
92 bNoErr = TRUE;
93#endif
94 }
95 else
96 {
98 return TRUE;
99 }
100 }
101
102 DPRINT1("Size: %I64u\n", ullSize);
103#if 0
104 DPRINT1("Offset: %I64u\n", ullOffset);
105#endif
106
108 {
109 ConPuts(StdOut, L"No space left for an extended partition!\n");
110 return TRUE;
111 }
112
114 {
115 ConPuts(StdOut, L"We already have an extended partition on this disk!\n");
116 return TRUE;
117 }
118
119 if (ullSize != 0)
120 ullSectorCount = (ullSize * 1024 * 1024) / CurrentDisk->BytesPerSector;
121 else
122 ullSectorCount = 0;
123
124 DPRINT1("SectorCount: %I64u\n", ullSectorCount);
125
127
128 PartEntry = CONTAINING_RECORD(ListEntry, PARTENTRY, ListEntry);
129 if (PartEntry->IsPartitioned)
130 {
131 ConPuts(StdOut, L"No disk space left for an extended partition!\n");
132 return TRUE;
133 }
134
135 if (ullSectorCount == 0)
136 {
137 PartEntry->IsPartitioned = TRUE;
138 PartEntry->New = TRUE;
140 PartEntry->FormatState = Unformatted;
141 PartEntry->FileSystemName[0] = L'\0';
142
143 CurrentPartition = PartEntry;
145 }
146 else
147 {
148 if (PartEntry->SectorCount.QuadPart == ullSectorCount)
149 {
150 PartEntry->IsPartitioned = TRUE;
151 PartEntry->New = TRUE;
153 PartEntry->FormatState = Unformatted;
154 PartEntry->FileSystemName[0] = L'\0';
155
156 CurrentPartition = PartEntry;
158 }
159 else if (PartEntry->SectorCount.QuadPart > ullSectorCount)
160 {
161 NewPartEntry = RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(PPARTENTRY));
162 if (NewPartEntry == NULL)
163 {
164 ConPuts(StdOut, L"Memory allocation failed!\n");
165 return TRUE;
166 }
167
168 NewPartEntry->DiskEntry = PartEntry->DiskEntry;
169
170 NewPartEntry->StartSector.QuadPart = PartEntry->StartSector.QuadPart;
171 NewPartEntry->SectorCount.QuadPart = ullSectorCount;
172
173 NewPartEntry->LogicalPartition = FALSE;
174 NewPartEntry->IsPartitioned = TRUE;
175 NewPartEntry->New = TRUE;
176 NewPartEntry->PartitionType = PARTITION_EXTENDED;
177 NewPartEntry->FormatState = Unformatted;
178 NewPartEntry->FileSystemName[0] = L'\0';
179
180 PartEntry->StartSector.QuadPart += ullSectorCount;
181 PartEntry->SectorCount.QuadPart -= ullSectorCount;
182
183 InsertTailList(ListEntry, &NewPartEntry->ListEntry);
184
185 CurrentPartition = NewPartEntry;
187 }
188 }
189
192 if (!NT_SUCCESS(Status))
193 {
196 return TRUE;
197 }
198
200
201 return TRUE;
202}
203
204
205BOOL
207 _In_ INT argc,
208 _In_ PWSTR *argv)
209{
210 PPARTENTRY PartEntry, NewPartEntry;
211 PLIST_ENTRY ListEntry;
212 ULONGLONG ullSize = 0ULL;
213 ULONGLONG ullSectorCount;
214#if 0
215 ULONGLONG ullOffset = 0ULL;
216 BOOL bNoErr = FALSE;
217#endif
219 INT i, length;
220 PWSTR pszSuffix = NULL;
222
223 if (CurrentDisk == NULL)
224 {
226 return TRUE;
227 }
228
230 {
232 return TRUE;
233 }
234
235 for (i = 3; i < argc; i++)
236 {
237 if (HasPrefix(argv[i], L"size=", &pszSuffix))
238 {
239 /* size=<N> (MB) */
240 DPRINT("Size : %s\n", pszSuffix);
241
242 ullSize = _wcstoui64(pszSuffix, NULL, 10);
243 if ((ullSize == 0) && (errno == ERANGE))
244 {
246 return TRUE;
247 }
248 }
249 else if (HasPrefix(argv[i], L"offset=", &pszSuffix))
250 {
251 /* offset=<N> (KB) */
252 DPRINT("Offset : %s\n", pszSuffix);
253 ConPuts(StdOut, L"The OFFSET option is not supported yet!\n");
254#if 0
255 ullOffset = _wcstoui64(pszSuffix, NULL, 10);
256 if ((ullOffset == 0) && (errno == ERANGE))
257 {
259 return TRUE;
260 }
261#endif
262 }
263 else if (HasPrefix(argv[i], L"id=", &pszSuffix))
264 {
265 /* id=<Byte> */
266 DPRINT("Id : %s\n", pszSuffix);
267
268 length = wcslen(pszSuffix);
269 if ((length == 1) || (length == 2))
270 {
271 /* Byte */
272 PartitionType = (UCHAR)wcstoul(pszSuffix, NULL, 16);
273 if ((PartitionType == 0) && (errno == ERANGE))
274 {
276 return TRUE;
277 }
278 }
279 else
280 {
282 return TRUE;
283 }
284 }
285 else if (HasPrefix(argv[i], L"align=", &pszSuffix))
286 {
287 /* align=<N> */
288 DPRINT("Align : %s\n", pszSuffix);
289 ConPuts(StdOut, L"The ALIGN option is not supported yet!\n");
290#if 0
291 bAlign = TRUE;
292#endif
293 }
294 else if (_wcsicmp(argv[i], L"noerr") == 0)
295 {
296 /* noerr */
297 DPRINT("NoErr\n", pszSuffix);
298 ConPuts(StdOut, L"The NOERR option is not supported yet!\n");
299#if 0
300 bNoErr = TRUE;
301#endif
302 }
303 else
304 {
306 return TRUE;
307 }
308 }
309
310 DPRINT1("Size: %I64u\n", ullSize);
311#if 0
312 DPRINT1("Offset: %I64u\n", ullOffset);
313#endif
314 DPRINT1("Partition Type: %hx\n", PartitionType);
315
316 if (ullSize != 0)
317 ullSectorCount = (ullSize * 1024 * 1024) / CurrentDisk->BytesPerSector;
318 else
319 ullSectorCount = 0;
320
321 DPRINT1("SectorCount: %I64u\n", ullSectorCount);
322
323 for (ListEntry = CurrentDisk->LogicalPartListHead.Flink;
324 ListEntry != &CurrentDisk->LogicalPartListHead;
325 ListEntry = ListEntry->Flink)
326 {
327 PartEntry = CONTAINING_RECORD(ListEntry, PARTENTRY, ListEntry);
328 if (PartEntry->IsPartitioned)
329 continue;
330
331 if (ullSectorCount == 0)
332 {
333 PartEntry->IsPartitioned = TRUE;
334 PartEntry->New = TRUE;
335 PartEntry->PartitionType = PartitionType;
336 PartEntry->FormatState = Unformatted;
337 PartEntry->FileSystemName[0] = L'\0';
338
339 CurrentPartition = PartEntry;
341 break;
342 }
343 else
344 {
345 if (PartEntry->SectorCount.QuadPart == ullSectorCount)
346 {
347 PartEntry->IsPartitioned = TRUE;
348 PartEntry->New = TRUE;
349 PartEntry->PartitionType = PartitionType;
350 PartEntry->FormatState = Unformatted;
351 PartEntry->FileSystemName[0] = L'\0';
352
353 CurrentPartition = PartEntry;
355 break;
356 }
357 else if (PartEntry->SectorCount.QuadPart > ullSectorCount)
358 {
359 NewPartEntry = RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(PPARTENTRY));
360 if (NewPartEntry == NULL)
361 {
362 ConPuts(StdOut, L"Memory allocation failed!\n");
363 return TRUE;
364 }
365
366 NewPartEntry->DiskEntry = PartEntry->DiskEntry;
367
368 NewPartEntry->StartSector.QuadPart = PartEntry->StartSector.QuadPart;
369 NewPartEntry->SectorCount.QuadPart = ullSectorCount;
370
371 NewPartEntry->LogicalPartition = TRUE;
372 NewPartEntry->IsPartitioned = TRUE;
373 NewPartEntry->New = TRUE;
374 NewPartEntry->PartitionType = PartitionType;
375 NewPartEntry->FormatState = Unformatted;
376 NewPartEntry->FileSystemName[0] = L'\0';
377
378 PartEntry->StartSector.QuadPart += ullSectorCount;
379 PartEntry->SectorCount.QuadPart -= ullSectorCount;
380
381 InsertTailList(ListEntry, &NewPartEntry->ListEntry);
382
383 CurrentPartition = NewPartEntry;
385 break;
386 }
387 }
388 }
389
392 if (!NT_SUCCESS(Status))
393 {
396 return TRUE;
397 }
398
400
401 return TRUE;
402}
403
404
405BOOL
407 _In_ INT argc,
408 _In_ PWSTR *argv)
409{
410 PPARTENTRY PartEntry, NewPartEntry;
411 PLIST_ENTRY ListEntry;
412 ULONGLONG ullSize = 0ULL;
413 ULONGLONG ullSectorCount;
414#if 0
415 ULONGLONG ullOffset = 0ULL;
416 BOOL bNoErr = FALSE;
417#endif
419 INT i, length;
420 PWSTR pszSuffix = NULL;
422
423 if (CurrentDisk == NULL)
424 {
426 return TRUE;
427 }
428
430 {
431 ConPuts(StdOut, L"GPT Partitions are not supported yet!\n");
432 return TRUE;
433 }
434 else if (CurrentDisk->PartitionStyle == PARTITION_STYLE_RAW)
435 {
436 /* FIXME: Initialize disk properly! */
438 }
439
440 for (i = 3; i < argc; i++)
441 {
442 if (HasPrefix(argv[i], L"size=", &pszSuffix))
443 {
444 /* size=<N> (MB) */
445 DPRINT("Size : %s\n", pszSuffix);
446
447 ullSize = _wcstoui64(pszSuffix, NULL, 10);
448 if ((ullSize == 0) && (errno == ERANGE))
449 {
451 return TRUE;
452 }
453 }
454 else if (HasPrefix(argv[i], L"offset=", &pszSuffix))
455 {
456 /* offset=<N> (KB) */
457 DPRINT("Offset : %s\n", pszSuffix);
458 ConPuts(StdOut, L"The OFFSET option is not supported yet!\n");
459#if 0
460 ullOffset = _wcstoui64(pszSuffix, NULL, 10);
461 if ((ullOffset == 0) && (errno == ERANGE))
462 {
464 return TRUE;
465 }
466#endif
467 }
468 else if (HasPrefix(argv[i], L"id=", &pszSuffix))
469 {
470 /* id=<Byte>|<GUID> */
471 DPRINT("Id : %s\n", pszSuffix);
472
473 length = wcslen(pszSuffix);
474 if ((length == 1) || (length == 2))
475 {
476 /* Byte */
477 PartitionType = (UCHAR)wcstoul(pszSuffix, NULL, 16);
478 if ((PartitionType == 0) && (errno == ERANGE))
479 {
481 return TRUE;
482 }
483 }
484#if 0
485 else if ()
486 {
487 /* GUID */
488 }
489#endif
490 else
491 {
493 return TRUE;
494 }
495 }
496 else if (HasPrefix(argv[i], L"align=", &pszSuffix))
497 {
498 /* align=<N> */
499 DPRINT("Align : %s\n", pszSuffix);
500 ConPuts(StdOut, L"The ALIGN option is not supported yet!\n");
501#if 0
502 bAlign = TRUE;
503#endif
504 }
505 else if (_wcsicmp(argv[i], L"noerr") == 0)
506 {
507 /* noerr */
508 DPRINT("NoErr\n", pszSuffix);
509 ConPuts(StdOut, L"The NOERR option is not supported yet!\n");
510#if 0
511 bNoErr = TRUE;
512#endif
513 }
514 else
515 {
517 return TRUE;
518 }
519 }
520
521 DPRINT1("Size: %I64u\n", ullSize);
522#if 0
523 DPRINT1("Offset: %I64u\n", ullOffset);
524#endif
525 DPRINT1("Partition Type: %hx\n", PartitionType);
526
528 {
529 ConPuts(StdOut, L"No space left for another primary partition!\n");
530 return TRUE;
531 }
532
533 if (ullSize != 0)
534 ullSectorCount = (ullSize * 1024 * 1024) / CurrentDisk->BytesPerSector;
535 else
536 ullSectorCount = 0;
537
538 DPRINT1("SectorCount: %I64u\n", ullSectorCount);
539
540 for (ListEntry = CurrentDisk->PrimaryPartListHead.Flink;
541 ListEntry != &CurrentDisk->PrimaryPartListHead;
542 ListEntry = ListEntry->Flink)
543 {
544 PartEntry = CONTAINING_RECORD(ListEntry, PARTENTRY, ListEntry);
545 if (PartEntry->IsPartitioned)
546 continue;
547
548 if (ullSectorCount == 0)
549 {
550 PartEntry->IsPartitioned = TRUE;
551 PartEntry->New = TRUE;
552 PartEntry->PartitionType = PartitionType;
553 PartEntry->FormatState = Unformatted;
554 PartEntry->FileSystemName[0] = L'\0';
555
556 CurrentPartition = PartEntry;
558 break;
559 }
560 else
561 {
562 if (PartEntry->SectorCount.QuadPart == ullSectorCount)
563 {
564 PartEntry->IsPartitioned = TRUE;
565 PartEntry->New = TRUE;
566 PartEntry->PartitionType = PartitionType;
567 PartEntry->FormatState = Unformatted;
568 PartEntry->FileSystemName[0] = L'\0';
569
570 CurrentPartition = PartEntry;
572 break;
573 }
574 else if (PartEntry->SectorCount.QuadPart > ullSectorCount)
575 {
576 NewPartEntry = RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(PPARTENTRY));
577 if (NewPartEntry == NULL)
578 {
579 ConPuts(StdOut, L"Memory allocation failed!\n");
580 return TRUE;
581 }
582
583 NewPartEntry->DiskEntry = PartEntry->DiskEntry;
584
585 NewPartEntry->StartSector.QuadPart = PartEntry->StartSector.QuadPart;
586 NewPartEntry->SectorCount.QuadPart = ullSectorCount;
587
588 NewPartEntry->LogicalPartition = FALSE;
589 NewPartEntry->IsPartitioned = TRUE;
590 NewPartEntry->New = TRUE;
591 NewPartEntry->PartitionType = PartitionType;
592 NewPartEntry->FormatState = Unformatted;
593 NewPartEntry->FileSystemName[0] = L'\0';
594
595 PartEntry->StartSector.QuadPart += ullSectorCount;
596 PartEntry->SectorCount.QuadPart -= ullSectorCount;
597
598 InsertTailList(ListEntry, &NewPartEntry->ListEntry);
599
600 CurrentPartition = NewPartEntry;
602 break;
603 }
604 }
605 }
606
609 if (!NT_SUCCESS(Status))
610 {
613 return TRUE;
614 }
615
617
618 return TRUE;
619}
static int argc
Definition: ServiceArgs.c:12
#define ERANGE
Definition: acclib.h:92
void ConPuts(FILE *fp, LPCWSTR psz)
Definition: fc.c:16
#define StdOut
Definition: fc.c:14
#define StdErr
Definition: fc.c:15
void ConResPuts(FILE *fp, UINT nID)
Definition: fc.c:27
LONG NTSTATUS
Definition: precomp.h:26
#define DPRINT1
Definition: precomp.h:8
BOOL CreateLogicalPartition(_In_ INT argc, _In_ PWSTR *argv)
Definition: create.c:206
BOOL CreateExtendedPartition(_In_ INT argc, _In_ PWSTR *argv)
Definition: create.c:16
BOOL CreatePrimaryPartition(_In_ INT argc, _In_ PWSTR *argv)
Definition: create.c:406
#define IDS_CREATE_PARTITION_INVALID_STYLE
Definition: resource.h:39
#define IDS_CREATE_PARTITION_FAIL
Definition: resource.h:37
#define IDS_ERROR_INVALID_ARGS
Definition: resource.h:202
#define IDS_SELECT_NO_DISK
Definition: resource.h:94
#define IDS_CREATE_PARTITION_SUCCESS
Definition: resource.h:38
#define PARTITION_EXTENDED
Definition: disk.h:76
#define PARTITION_HUGE
Definition: disk.h:77
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
Definition: heap.c:616
BOOL HasPrefix(_In_ PWSTR pszString, _In_ PWSTR pszPrefix, _Out_opt_ PWSTR *pszSuffix)
Definition: misc.c:58
PDISKENTRY CurrentDisk
Definition: partlist.c:76
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
#define L(x)
Definition: resources.c:13
#define InsertTailList(ListHead, Entry)
unsigned int BOOL
Definition: ntddk_ex.h:94
Status
Definition: gdiplustypes.h:25
GLuint GLsizei GLsizei * length
Definition: glext.h:6040
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
Definition: glfuncs.h:248
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
@ Unformatted
Definition: partlist.h:34
@ PARTITION_STYLE_GPT
Definition: imports.h:202
@ PARTITION_STYLE_MBR
Definition: imports.h:201
#define ULL(a, b)
Definition: format_msg.c:27
#define argv
Definition: mplay32.c:18
#define _In_
Definition: no_sal2.h:158
CHAR PartitionType
Definition: part_xbox.c:32
#define errno
Definition: errno.h:18
_Check_return_ unsigned long __cdecl wcstoul(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, _In_ int _Radix)
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
Definition: _wcsicmp_nt.c:13
static VOID UpdateDiskLayout(IN PDISKENTRY DiskEntry)
Definition: partlist.c:2589
#define GetPrimaryPartitionCount(DiskEntry)
Definition: partlist.c:2527
NTSTATUS WritePartitions(IN PDISKENTRY DiskEntry)
Definition: partlist.c:3593
#define DPRINT
Definition: sndvol32.h:73
PPARTENTRY ExtendedPartition
Definition: partlist.h:153
LIST_ENTRY LogicalPartListHead
Definition: partlist.h:150
ULONG BytesPerSector
Definition: partlist.h:113
BOOLEAN Dirty
Definition: partlist.h:136
DWORD PartitionStyle
Definition: diskpart.h:179
LIST_ENTRY PrimaryPartListHead
Definition: partlist.h:149
Definition: typedefs.h:120
struct _LIST_ENTRY * Blink
Definition: typedefs.h:122
struct _LIST_ENTRY * Flink
Definition: typedefs.h:121
BOOLEAN IsPartitioned
Definition: partlist.h:82
UCHAR PartitionType
Definition: partlist.h:73
BOOLEAN New
Definition: partlist.h:85
ULARGE_INTEGER SectorCount
Definition: partlist.h:70
struct _DISKENTRY * DiskEntry
Definition: partlist.h:66
BOOLEAN LogicalPartition
Definition: partlist.h:79
FORMATSTATE FormatState
Definition: diskpart.h:119
LIST_ENTRY ListEntry
Definition: partlist.h:63
ULARGE_INTEGER StartSector
Definition: partlist.h:69
CHAR FileSystemName[9]
Definition: diskpart.h:118
ULONGLONG QuadPart
Definition: ms-dtyp.idl:185
uint16_t * PWSTR
Definition: typedefs.h:56
int32_t INT
Definition: typedefs.h:58
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint64_t ULONGLONG
Definition: typedefs.h:67
static PPARTENTRY CurrentPartition
Definition: usetup.c:78
unsigned __int64 CDECL _wcstoui64(const wchar_t *nptr, wchar_t **endptr, int base)
Definition: wtoi64.c:200
unsigned char UCHAR
Definition: xmlstorage.h:181