ReactOS 0.4.16-dev-2206-gc56950d
diskpart.h
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/diskpart.h
5 * PURPOSE: Manages all the partitions of the OS in an interactive way.
6 * PROGRAMMERS: Lee Schroeder
7 */
8
9#ifndef DISKPART_H
10#define DISKPART_H
11
12/* INCLUDES ******************************************************************/
13
14#include <stdio.h>
15#include <stdlib.h>
16
17#define WIN32_NO_STATUS
18#include <windef.h>
19#include <winbase.h>
20#include <winnls.h>
21#include <winreg.h>
22#include <wincon.h>
23#include <winioctl.h>
24#include <winuser.h>
25#include <ntsecapi.h>
26
27#include <errno.h>
28#include <strsafe.h>
29
30#include <conutils.h>
31
32/*
33#define NTOS_MODE_USER
34#include <ndk/exfuncs.h>
35#include <ndk/iofuncs.h>
36#include <ndk/obfuncs.h>
37#include <ndk/psfuncs.h>
38#include <ndk/rtlfuncs.h>
39#include <ndk/umfuncs.h>
40*/
41
42#define NTOS_MODE_USER
43#include <ndk/cmfuncs.h>
44#include <ndk/exfuncs.h>
45#include <ndk/iofuncs.h>
46#include <ndk/kefuncs.h>
47#include <ndk/mmfuncs.h>
48#include <ndk/obfuncs.h>
49#include <ndk/psfuncs.h>
50#include <ndk/rtlfuncs.h>
51#include <ndk/setypes.h>
52#include <ndk/umfuncs.h>
53
54#include <ntddscsi.h>
55#include <ntddstor.h>
56#include <mountmgr.h>
57
58#include <fmifs/fmifs.h>
59#include <guiddef.h>
60#include <diskguid.h>
61
62#include "resource.h"
63
64//#define DUMP_PARTITION_TABLE
65//#define DUMP_PARTITION_LIST
66
67/* DEFINES *******************************************************************/
68
69/* NOERR codes for the program */
70#undef EXIT_SUCCESS
71#undef EXIT_FAILURE
72
73typedef enum _EXIT_CODE
74{
81 EXIT_EXIT /* Only used by the exit command */
83
84typedef struct _COMMAND
85{
93
94extern COMMAND cmds[];
95
96#define MAX_STRING_SIZE 1024
97#define MAX_ARGS_COUNT 256
98
99
100typedef enum _FORMATSTATE
101{
108
109typedef enum _VOLUME_TYPE
110{
116
118{
122
124{
129
130typedef struct _PARTENTRY
131{
133
134 struct _DISKENTRY *DiskEntry;
135
138
139 union
140 {
143 };
144
148
153
155
156 /* Partition is partitioned disk space */
158
159 /* Partition is new. Table does not exist on disk yet */
160 BOOLEAN New;
161
162 /* Partition was created automatically. */
164
165 /* Partition must be checked */
167
169
172
174
175
176typedef struct _BIOSDISKENTRY
177{
186
187
188typedef struct _DISKENTRY
189{
191
195
200
204
207
210// ULONG Signature;
211// ULONG Checksum;
212
214 USHORT Port;
218
219 /* Has the partition list been modified? */
221
224
226
227 PDRIVE_LAYOUT_INFORMATION_EX LayoutBuffer;
228
230
233
235
237
238typedef struct _VOLENTRY
239{
241
246
248
253
258
261
263
265
266#define SIZE_1KB (1024ULL)
267#define SIZE_10KB (10ULL * 1024ULL)
268#define SIZE_1MB (1024ULL * 1024ULL)
269#define SIZE_10MB (10ULL * 1024ULL * 1024ULL)
270#define SIZE_1GB (1024ULL * 1024ULL * 1024ULL)
271#define SIZE_10GB (10ULL * 1024ULL * 1024ULL * 1024ULL)
272#define SIZE_1TB (1024ULL * 1024ULL * 1024ULL * 1024ULL)
273#define SIZE_10TB (10ULL * 1024ULL * 1024ULL * 1024ULL * 1024ULL)
274
275
276/* GLOBAL VARIABLES ***********************************************************/
277
281
285
286/* PROTOTYPES *****************************************************************/
287
288/* active.c */
291 _In_ INT argc,
292 _In_ PWSTR *argv);
293
294/* add.c */
297 _In_ INT argc,
298 _In_ PWSTR *argv);
299
300/* assign.c */
303 _In_ INT argc,
304 _In_ PWSTR *argv);
305
306/* attach.c */
309 _In_ INT argc,
310 _In_ PWSTR *argv);
311
312/* attributes.h */
315 _In_ INT argc,
316 _In_ PWSTR *argv);
317
318/* automount.c */
321 _In_ INT argc,
322 _In_ PWSTR *argv);
323
324/* break.c */
327 _In_ INT argc,
328 _In_ PWSTR *argv);
329
330/* clean.c */
333 _In_ INT argc,
334 _In_ PWSTR *argv);
335
336/* compact.c */
339 _In_ INT argc,
340 _In_ PWSTR *argv);
341
342/* convert.c */
345 _In_ ULONG DiskNumber,
346 _In_ PCREATE_DISK DiskInfo);
347
350 _In_ INT argc,
351 _In_ PWSTR *argv);
352
355 _In_ INT argc,
356 _In_ PWSTR *argv);
357
358/* create.c */
361 _In_ INT argc,
362 _In_ PWSTR *argv);
363
366 _In_ INT argc,
367 _In_ PWSTR *argv);
368
371 _In_ INT argc,
372 _In_ PWSTR *argv);
373
376 _In_ INT argc,
377 _In_ PWSTR *argv);
378
381 _In_ INT argc,
382 _In_ PWSTR *argv);
383
384/* delete.c */
387 _In_ INT argc,
388 _In_ PWSTR *argv);
389
392 _In_ INT argc,
393 _In_ PWSTR *argv);
394
397 _In_ INT argc,
398 _In_ PWSTR *argv);
399
400
401/* detach.c */
404 _In_ INT argc,
405 _In_ PWSTR *argv);
406
407/* detail.c */
410 INT argc,
411 PWSTR *argv);
412
415 INT argc,
416 PWSTR *argv);
417
420 INT argc,
421 PWSTR *argv);
422
423/* diskpart.c */
424
425/* dump.c */
428 _In_ INT argc,
429 _In_ LPWSTR *argv);
430
433 _In_ INT argc,
434 _In_ LPWSTR *argv);
435
436
437/* expand.c */
440 _In_ INT argc,
441 _In_ PWSTR *argv);
442
443/* extend.c */
446 _In_ INT argc,
447 _In_ PWSTR *argv);
448
449/* filesystem.c */
452 _In_ INT argc,
453 _In_ PWSTR *argv);
454
455/* format.c */
458 _In_ INT argc,
459 _In_ PWSTR *argv);
460
461/* gpt.c */
464 _In_ INT argc,
465 _In_ PWSTR *argv);
466
467/* help.c */
470 _In_ INT argc,
471 _In_ PWSTR *argv);
472
473VOID
475
478 _In_ PCOMMAND pCommand);
479
480/* import. c */
483 _In_ INT argc,
484 _In_ PWSTR *argv);
485
486/* inactive.c */
489 _In_ INT argc,
490 _In_ PWSTR *argv);
491
492/* interpreter.c */
496
499 _In_ INT argc,
500 _In_ PWSTR *argv);
501
502VOID
504
505/* list.c */
508 INT argc,
509 PWSTR *argv);
510
513 INT argc,
514 PWSTR *argv);
515
518 INT argc,
519 PWSTR *argv);
520
523 INT argc,
524 PWSTR *argv);
525
526VOID
528 _In_ PDISKENTRY DiskEntry);
529
530VOID
532 _In_ PVOLENTRY VolumeEntry);
533
534/* merge.c */
537 _In_ INT argc,
538 _In_ PWSTR *argv);
539
540/* misc.c */
541BOOL
543 _In_ PWSTR pszDecString);
544
545BOOL
547 _In_ PWSTR pszHexString);
548
549BOOL
551 _In_ PWSTR pszString,
552 _In_ PWSTR pszPrefix,
553 _Out_opt_ PWSTR *pszSuffix);
554
557 _In_ ULONGLONG Dividend,
559
560PWSTR
562 _In_ PWSTR pszInString);
563
564PWSTR
566 _In_ PWSTR pszInString);
567
568VOID
570 _Out_ GUID *pGuid);
571
572VOID
574 _Out_ PDWORD pSignature);
575
576VOID
578 _Out_ PWSTR pszBuffer,
579 _In_ GUID *pGuid);
580
581BOOL
583 _Out_ GUID *pGuid,
584 _In_ PWSTR pszString);
585
586VOID
588 _Out_ PWSTR pszBuffer,
589 _In_ INT cchBufferMax,
590 _In_ STORAGE_BUS_TYPE Bustype);
591
592/* mountmgr.h */
593BOOL
596
597BOOL
600
601BOOL
603
604BOOL
607 _In_ WCHAR DriveLetter);
608
609BOOL
612 _Out_ PWCHAR DriveLetter);
613
614BOOL
616 _In_ WCHAR DriveLetter);
617
618/* offline.c */
621 _In_ INT argc,
622 _In_ PWSTR *argv);
623
624/* online.c */
627 _In_ INT argc,
628 _In_ PWSTR *argv);
629
630/* partlist.c */
631#ifdef DUMP_PARTITION_TABLE
632VOID
633DumpPartitionTable(
634 _In_ PDISKENTRY DiskEntry);
635#endif
636
637#ifdef DUMP_PARTITION_LIST
638VOID
639DumpPartitionList(
640 _In_ PDISKENTRY DiskEntry);
641#endif
642
647
650
651VOID
653
656
657VOID
659
660VOID
662 PDISKENTRY DiskEntry);
663
664VOID
666 PDISKENTRY DiskEntry);
667
668VOID
671 _In_ PDISKENTRY DiskEntry);
672
675 _In_ PDISKENTRY DiskEntry);
676
679 _In_ PDISKENTRY DiskEntry);
680
681VOID
683 _In_ PDISKENTRY DiskEntry);
684
685VOID
687 _In_ PDISKENTRY DiskEntry,
688 _In_ BOOL DeleteEntry);
689
692 _In_ PPARTENTRY PartEntry);
693
696 _In_ PPARTENTRY PartEntry);
697
698ULONG
700 _In_ PDISKENTRY DiskEntry);
701
704 _In_ PPARTENTRY PartEntry);
705
708 _In_ PPARTENTRY PartEntry);
709
710VOID
712 _In_ PVOLENTRY VolumeEntry);
713
714
715/* recover.c */
718 _In_ INT argc,
719 _In_ PWSTR *argv);
720
721/* remove.c */
724 _In_ INT argc,
725 _In_ PWSTR *argv);
726
727/* repair.c */
730 _In_ INT argc,
731 _In_ PWSTR *argv);
732
733/* rescan.c */
736 _In_ INT argc,
737 _In_ PWSTR *argv);
738
739/* retain.c */
742 _In_ INT argc,
743 _In_ PWSTR *argv);
744
745/* san.c */
748 _In_ INT argc,
749 _In_ PWSTR *argv);
750
751/* select.c */
754 INT argc,
755 PWSTR *argv);
756
759 INT argc,
760 PWSTR *argv);
761
764 INT argc,
765 PWSTR *argv);
766/*
767EXIT_CODE
768SelectVirtualDisk(
769 INT argc,
770 PWSTR *argv);
771*/
772/* setid.c */
775 _In_ INT argc,
776 _In_ PWSTR *argv);
777
778/* shrink.c */
781 _In_ INT argc,
782 _In_ PWSTR *argv);
783
784/* uniqueid.c */
787 _In_ INT argc,
788 _In_ PWSTR *argv);
789
790#endif /* DISKPART_H */
unsigned char BOOLEAN
static int argc
Definition: ServiceArgs.c:12
LONG NTSTATUS
Definition: precomp.h:26
VOID UpdateMbrDiskLayout(_In_ PDISKENTRY DiskEntry)
Definition: partlist.c:2553
VOID RemoveVolume(_In_ PVOLENTRY VolumeEntry)
Definition: partlist.c:3023
LIST_ENTRY VolumeListHead
Definition: partlist.c:73
VOID CreateGUID(_Out_ GUID *pGuid)
Definition: misc.c:152
ULONGLONG AlignDown(_In_ ULONGLONG Value, _In_ ULONG Alignment)
Definition: partlist.c:189
EXIT_CODE DetailPartition(INT argc, PWSTR *argv)
EXIT_CODE DumpDisk(_In_ INT argc, _In_ LPWSTR *argv)
_VOLUME_TYPE
Definition: diskpart.h:110
@ VOLUME_TYPE_UNKNOWN
Definition: diskpart.h:114
@ VOLUME_TYPE_REMOVABLE
Definition: diskpart.h:113
@ VOLUME_TYPE_CDROM
Definition: diskpart.h:111
@ VOLUME_TYPE_PARTITION
Definition: diskpart.h:112
BOOL HasPrefix(_In_ PWSTR pszString, _In_ PWSTR pszPrefix, _Out_opt_ PWSTR *pszSuffix)
Definition: misc.c:58
enum _EXIT_CODE EXIT_CODE
BOOL GetAutomountState(_Out_ PBOOL State)
Definition: mountmgr.c:46
BOOL ScrubAutomount(VOID)
Definition: mountmgr.c:141
EXIT_CODE expand_main(_In_ INT argc, _In_ PWSTR *argv)
Definition: expand.c:12
EXIT_CODE recover_main(_In_ INT argc, _In_ PWSTR *argv)
Definition: recover.c:12
EXIT_CODE active_main(_In_ INT argc, _In_ PWSTR *argv)
Definition: active.c:16
LIST_ENTRY BiosDiskListHead
Definition: partlist.c:72
PPARTENTRY GetPrevUnpartitionedEntry(_In_ PPARTENTRY PartEntry)
Definition: partlist.c:2820
struct _VOLENTRY VOLENTRY
VOID PrintGUID(_Out_ PWSTR pszBuffer, _In_ GUID *pGuid)
Definition: misc.c:187
VOID UpdateGptDiskLayout(_In_ PDISKENTRY DiskEntry, _In_ BOOL DeleteEntry)
Definition: partlist.c:2730
EXIT_CODE DumpPartition(_In_ INT argc, _In_ LPWSTR *argv)
EXIT_CODE automount_main(_In_ INT argc, _In_ PWSTR *argv)
Definition: automount.c:16
EXIT_CODE DeletePartition(_In_ INT argc, _In_ PWSTR *argv)
Definition: delete.c:274
EXIT_CODE setid_main(_In_ INT argc, _In_ PWSTR *argv)
Definition: setid.c:16
enum _FORMATSTATE FORMATSTATE
EXIT_CODE CreateMsrPartition(_In_ INT argc, _In_ PWSTR *argv)
Definition: create.c:635
EXIT_CODE filesystems_main(_In_ INT argc, _In_ PWSTR *argv)
Definition: filesystems.c:88
EXIT_CODE clean_main(_In_ INT argc, _In_ PWSTR *argv)
Definition: clean.c:16
enum _FORMATSTATE * PFORMATSTATE
EXIT_CODE remove_main(_In_ INT argc, _In_ PWSTR *argv)
Definition: remove.c:15
VOID DestroyVolumeList(VOID)
Definition: partlist.c:2196
EXIT_CODE offline_main(_In_ INT argc, _In_ PWSTR *argv)
Definition: offline.c:12
EXIT_CODE CreatePrimaryPartition(_In_ INT argc, _In_ PWSTR *argv)
Definition: create.c:1094
EXIT_CODE repair_main(_In_ INT argc, _In_ PWSTR *argv)
Definition: repair.c:12
struct _MBR_PARTITION_DATA * PMBR_PARTITION_DATA
EXIT_CODE CreateEfiPartition(_In_ INT argc, _In_ PWSTR *argv)
Definition: create.c:16
NTSTATUS DismountVolume(_In_ PPARTENTRY PartEntry)
Definition: partlist.c:2878
EXIT_CODE add_main(_In_ INT argc, _In_ PWSTR *argv)
Definition: add.c:12
EXIT_CODE gpt_main(_In_ INT argc, _In_ PWSTR *argv)
Definition: gpt.c:16
PDISKENTRY CurrentDisk
Definition: partlist.c:75
EXIT_CODE shrink_main(_In_ INT argc, _In_ PWSTR *argv)
Definition: shrink.c:12
struct _COMMAND * PCOMMAND
NTSTATUS CreateVolumeList(VOID)
Definition: partlist.c:2158
BOOL DeleteDriveLetter(_In_ WCHAR DriveLetter)
Definition: mountmgr.c:338
EXIT_CODE attributes_main(_In_ INT argc, _In_ PWSTR *argv)
Definition: attributes.c:12
EXIT_CODE DetailVolume(INT argc, PWSTR *argv)
EXIT_CODE merge_main(_In_ INT argc, _In_ PWSTR *argv)
Definition: merge.c:12
struct _VOLENTRY * PVOLENTRY
EXIT_CODE DeleteVolume(_In_ INT argc, _In_ PWSTR *argv)
Definition: delete.c:347
EXIT_CODE detach_main(_In_ INT argc, _In_ PWSTR *argv)
Definition: detach.c:12
VOID DestroyPartitionList(VOID)
Definition: partlist.c:1611
NTSTATUS WriteMbrPartitions(_In_ PDISKENTRY DiskEntry)
Definition: partlist.c:2225
EXIT_CODE retain_main(_In_ INT argc, _In_ PWSTR *argv)
Definition: retain.c:12
VOID ReadLayoutBuffer(_In_ HANDLE FileHandle, _In_ PDISKENTRY DiskEntry)
Definition: partlist.c:1065
struct _PARTENTRY * PPARTENTRY
struct _BIOSDISKENTRY * PBIOSDISKENTRY
@ UnknownFormat
Definition: diskpart.h:104
@ Preformatted
Definition: diskpart.h:105
@ Formatted
Definition: diskpart.h:106
@ Unformatted
Definition: diskpart.h:102
@ UnformattedOrDamaged
Definition: diskpart.h:103
LIST_ENTRY DiskListHead
Definition: partlist.c:71
EXIT_CODE DetailDisk(INT argc, PWSTR *argv)
EXIT_CODE compact_main(_In_ INT argc, _In_ PWSTR *argv)
Definition: compact.c:12
EXIT_CODE CreateExtendedPartition(_In_ INT argc, _In_ PWSTR *argv)
Definition: create.c:214
EXIT_CODE ListVolume(INT argc, PWSTR *argv)
EXIT_CODE import_main(_In_ INT argc, _In_ PWSTR *argv)
Definition: import.c:12
EXIT_CODE ListVirtualDisk(INT argc, PWSTR *argv)
EXIT_CODE InterpretCmd(_In_ INT argc, _In_ PWSTR *argv)
EXIT_CODE ConvertMBR(_In_ INT argc, _In_ PWSTR *argv)
Definition: convert.c:148
EXIT_CODE inactive_main(_In_ INT argc, _In_ PWSTR *argv)
Definition: inactive.c:16
EXIT_CODE DeleteDisk(_In_ INT argc, _In_ PWSTR *argv)
Definition: delete.c:28
EXIT_CODE format_main(_In_ INT argc, _In_ PWSTR *argv)
Definition: format.c:95
NTSTATUS CreateDisk(_In_ ULONG DiskNumber, _In_ PCREATE_DISK DiskInfo)
Definition: convert.c:15
struct _COMMAND COMMAND
EXIT_CODE attach_main(_In_ INT argc, _In_ PWSTR *argv)
Definition: attach.c:12
EXIT_CODE ListPartition(INT argc, PWSTR *argv)
EXIT_CODE ListDisk(INT argc, PWSTR *argv)
EXIT_CODE extend_main(_In_ INT argc, _In_ PWSTR *argv)
Definition: extend.c:12
NTSTATUS CreatePartitionList(VOID)
Definition: partlist.c:1988
struct _DISKENTRY DISKENTRY
VOID ScanForUnpartitionedMbrDiskSpace(PDISKENTRY DiskEntry)
Definition: partlist.c:660
enum _VOLUME_TYPE VOLUME_TYPE
EXIT_CODE break_main(_In_ INT argc, _In_ PWSTR *argv)
Definition: break.c:12
EXIT_CODE online_main(_In_ INT argc, _In_ PWSTR *argv)
Definition: online.c:12
EXIT_CODE san_main(_In_ INT argc, _In_ PWSTR *argv)
Definition: san.c:12
PVOLENTRY CurrentVolume
Definition: partlist.c:77
EXIT_CODE rescan_main(_In_ INT argc, _In_ PWSTR *argv)
Definition: rescan.c:12
struct _GPT_PARTITION_DATA * PGPT_PARTITION_DATA
EXIT_CODE assign_main(_In_ INT argc, _In_ PWSTR *argv)
BOOL IsDecString(_In_ PWSTR pszDecString)
Definition: misc.c:14
PPARTENTRY CurrentPartition
Definition: partlist.c:76
NTSTATUS WriteGptPartitions(_In_ PDISKENTRY DiskEntry)
Definition: partlist.c:2349
PVOLENTRY GetVolumeFromPartition(_In_ PPARTENTRY PartEntry)
Definition: partlist.c:2986
BOOL SetAutomountState(_In_ BOOL bEnable)
Definition: mountmgr.c:90
EXIT_CODE SelectPartition(INT argc, PWSTR *argv)
VOID InterpretMain(VOID)
Definition: interpreter.c:232
BOOL IsHexString(_In_ PWSTR pszHexString)
Definition: misc.c:36
VOID PrintDisk(_In_ PDISKENTRY DiskEntry)
Definition: list.c:125
EXIT_CODE InterpretScript(_In_ LPWSTR line)
_EXIT_CODE
Definition: diskpart.h:74
@ EXIT_SERVICE
Definition: diskpart.h:79
@ EXIT_FATAL
Definition: diskpart.h:76
@ EXIT_EXIT
Definition: diskpart.h:81
@ EXIT_FILE
Definition: diskpart.h:78
@ EXIT_CMD_ARG
Definition: diskpart.h:77
@ EXIT_SUCCESS
Definition: diskpart.h:75
@ EXIT_SYNTAX
Definition: diskpart.h:80
COMMAND cmds[]
Definition: main.c:21
EXIT_CODE CreateLogicalPartition(_In_ INT argc, _In_ PWSTR *argv)
Definition: create.c:427
EXIT_CODE HelpCommand(_In_ PCOMMAND pCommand)
VOID HelpCommandList(VOID)
Definition: help.c:16
enum _VOLUME_TYPE * PVOLUME_TYPE
struct _MBR_PARTITION_DATA MBR_PARTITION_DATA
struct _GPT_PARTITION_DATA GPT_PARTITION_DATA
PPARTENTRY GetNextUnpartitionedEntry(_In_ PPARTENTRY PartEntry)
Definition: partlist.c:2849
BOOL AssignNextDriveLetter(_In_ PWSTR DeviceName, _Out_ PWCHAR DriveLetter)
Definition: mountmgr.c:261
EXIT_CODE help_main(_In_ INT argc, _In_ PWSTR *argv)
Definition: help.c:121
EXIT_CODE ConvertGPT(_In_ INT argc, _In_ PWSTR *argv)
Definition: convert.c:88
BOOL AssignDriveLetter(_In_ PWSTR DeviceName, _In_ WCHAR DriveLetter)
Definition: mountmgr.c:181
VOID ScanForUnpartitionedGptDiskSpace(PDISKENTRY DiskEntry)
Definition: partlist.c:921
ULONGLONG RoundingDivide(_In_ ULONGLONG Dividend, _In_ ULONGLONG Divisor)
Definition: misc.c:75
EXIT_CODE SelectVolume(INT argc, PWSTR *argv)
EXIT_CODE UniqueIdDisk(_In_ INT argc, _In_ PWSTR *argv)
Definition: uniqueid.c:17
EXIT_CODE SelectDisk(INT argc, PWSTR *argv)
PWSTR DuplicateQuotedString(_In_ PWSTR pszInString)
Definition: misc.c:84
VOID PrintBusType(_Out_ PWSTR pszBuffer, _In_ INT cchBufferMax, _In_ STORAGE_BUS_TYPE Bustype)
Definition: misc.c:295
struct _BIOSDISKENTRY BIOSDISKENTRY
VOID PrintVolume(_In_ PVOLENTRY VolumeEntry)
Definition: list.c:361
struct _DISKENTRY * PDISKENTRY
struct _PARTENTRY PARTENTRY
VOID CreateSignature(_Out_ PDWORD pSignature)
Definition: misc.c:168
BOOL StringToGUID(_Out_ GUID *pGuid, _In_ PWSTR pszString)
Definition: misc.c:227
#define MAX_PATH
Definition: compat.h:34
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
_Must_inspect_result_ _In_opt_ PFLT_INSTANCE _Out_ PHANDLE FileHandle
Definition: fltkernel.h:1231
GLenum func
Definition: glext.h:6028
_FORMATSTATE
Definition: partlist.h:33
BOOL * PBOOL
Definition: minwindef.h:137
#define argv
Definition: mplay32.c:18
#define _Out_opt_
Definition: no_sal2.h:214
#define _Out_
Definition: no_sal2.h:160
#define _In_
Definition: no_sal2.h:158
DWORD * PDWORD
Definition: pedump.c:68
unsigned short USHORT
Definition: pedump.c:61
#define INT
Definition: polytest.cpp:20
enum _STORAGE_BUS_TYPE STORAGE_BUS_TYPE
#define GetPrimaryPartitionCount(DiskEntry)
Definition: partlist.c:2527
#define DuplicateString(x)
Definition: stringutils.h:45
BOOLEAN Recognized
Definition: diskpart.h:182
LIST_ENTRY ListEntry
Definition: partlist.h:159
ULONG DiskNumber
Definition: partlist.h:162
ULONG Checksum
Definition: partlist.h:164
ULONG Signature
Definition: partlist.h:163
CM_DISK_GEOMETRY_DEVICE_DATA DiskGeometry
Definition: partlist.h:166
CM_INT13_DRIVE_PARAMETER Int13DiskData
Definition: partlist.h:167
Definition: main.c:15
INT help
Definition: diskpart.h:90
PWSTR cmd3
Definition: diskpart.h:88
DWORD help_detail
Definition: diskpart.h:91
PWSTR cmd2
Definition: diskpart.h:87
PWSTR cmd1
Definition: diskpart.h:86
ULARGE_INTEGER EndSector
Definition: diskpart.h:206
ULONG SectorAlignment
Definition: partlist.h:116
ULONG BiosDiskNumber
Definition: diskpart.h:209
PDRIVE_LAYOUT_INFORMATION_EX LayoutBuffer
Definition: diskpart.h:227
BOOL IsBoot
Definition: diskpart.h:234
ULARGE_INTEGER SectorCount
Definition: partlist.h:115
UNICODE_STRING DriverName
Definition: partlist.h:141
STORAGE_BUS_TYPE BusType
Definition: diskpart.h:194
ULONG SectorsPerTrack
Definition: partlist.h:112
USHORT TargetId
Definition: diskpart.h:216
PPARTENTRY ExtendedPartition
Definition: partlist.h:153
LIST_ENTRY LogicalPartListHead
Definition: partlist.h:150
BOOLEAN NewDisk
Definition: partlist.h:138
ULONG DiskNumber
Definition: partlist.h:129
ULONG BytesPerSector
Definition: partlist.h:113
USHORT PathId
Definition: diskpart.h:215
BOOLEAN BiosFound
Definition: partlist.h:120
PWSTR Location
Definition: diskpart.h:193
ULONGLONG Cylinders
Definition: partlist.h:110
USHORT Lun
Definition: diskpart.h:217
LIST_ENTRY ListEntry
Definition: partlist.h:101
BOOLEAN Dirty
Definition: partlist.h:136
ULARGE_INTEGER StartSector
Definition: diskpart.h:205
USHORT Port
Definition: partlist.h:131
DWORD PartitionStyle
Definition: diskpart.h:223
ULONG TracksPerCylinder
Definition: partlist.h:111
LIST_ENTRY PrimaryPartListHead
Definition: partlist.h:149
PWSTR Description
Definition: diskpart.h:192
ULONG CylinderAlignment
Definition: partlist.h:117
DWORD64 Attributes
Definition: diskpart.h:127
Definition: typedefs.h:120
BOOLEAN BootIndicator
Definition: diskpart.h:119
BOOLEAN IsPartitioned
Definition: partlist.h:82
BOOLEAN AutoCreate
Definition: diskpart.h:163
BOOLEAN New
Definition: partlist.h:85
BOOL IsBoot
Definition: diskpart.h:171
ULARGE_INTEGER SectorCount
Definition: partlist.h:70
CHAR VolumeLabel[17]
Definition: diskpart.h:150
struct _DISKENTRY * DiskEntry
Definition: partlist.h:66
BOOLEAN LogicalPartition
Definition: partlist.h:79
CHAR DriveLetter
Definition: diskpart.h:149
MBR_PARTITION_DATA Mbr
Definition: diskpart.h:141
FORMATSTATE FormatState
Definition: diskpart.h:152
GPT_PARTITION_DATA Gpt
Definition: diskpart.h:142
struct _FILE_SYSTEM_ITEM * FileSystem
Definition: diskpart.h:168
BOOL IsSystem
Definition: diskpart.h:170
ULONG OnDiskPartitionNumber
Definition: partlist.h:74
BOOLEAN NeedsCheck
Definition: diskpart.h:166
LIST_ENTRY ListEntry
Definition: partlist.h:63
ULONG PartitionNumber
Definition: partlist.h:75
ULARGE_INTEGER StartSector
Definition: partlist.h:69
ULONG PartitionIndex
Definition: partlist.h:76
CHAR FileSystemName[9]
Definition: diskpart.h:151
BOOL IsBoot
Definition: diskpart.h:260
ULARGE_INTEGER Size
Definition: diskpart.h:252
VOLUME_TYPE VolumeType
Definition: diskpart.h:251
PVOLUME_DISK_EXTENTS pExtents
Definition: diskpart.h:262
ULARGE_INTEGER TotalAllocationUnits
Definition: diskpart.h:254
ULONG VolumeNumber
Definition: diskpart.h:242
ULONG SectorsPerAllocationUnit
Definition: diskpart.h:256
ULARGE_INTEGER AvailableAllocationUnits
Definition: diskpart.h:255
BOOL IsSystem
Definition: diskpart.h:259
PWSTR pszFilesystem
Definition: diskpart.h:250
ULONG BytesPerSector
Definition: diskpart.h:257
DWORD SerialNumber
Definition: diskpart.h:245
WCHAR VolumeName[MAX_PATH]
Definition: diskpart.h:243
LIST_ENTRY ListEntry
Entry in VolumesList.
Definition: partlist.h:45
PWSTR pszLabel
Definition: diskpart.h:249
WCHAR DriveLetter
Definition: diskpart.h:247
Definition: parser.c:49
uint16_t * PWSTR
Definition: typedefs.h:56
uint64_t DWORD64
Definition: typedefs.h:67
int32_t INT
Definition: typedefs.h:58
uint16_t * PWCHAR
Definition: typedefs.h:56
uint32_t ULONG
Definition: typedefs.h:59
uint64_t ULONGLONG
Definition: typedefs.h:67
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
Definition: wdfdevice.h:3281
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:413
_In_ BOOL bEnable
Definition: winddi.h:3426
_In_ LARGE_INTEGER Divisor
Definition: rtlfuncs.h:3061
unsigned char UCHAR
Definition: xmlstorage.h:181
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
char CHAR
Definition: xmlstorage.h:175