{
LIST_ENTRY ListEntry;
+ /* The list of disks/partitions this disk belongs to */
+ struct _PARTLIST *PartList;
+
/* Disk geometry */
ULONGLONG Cylinders;
typedef struct _PARTLIST
{
- /*
- * Disk & Partition iterators.
- *
- * NOTE that when CurrentPartition != NULL, then CurrentPartition->DiskEntry
- * must be the same as CurrentDisk. We should however keep the two members
- * separated as we can have a current (selected) disk without any current
- * partition, if the former does not contain any.
- */
- PDISKENTRY CurrentDisk;
- PPARTENTRY CurrentPartition;
-
/*
* The system partition where the boot manager resides.
* The corresponding system disk is obtained via:
OUT PDISKENTRY* pDiskEntry,
OUT PPARTENTRY* pPartEntry OPTIONAL);
-BOOLEAN
+PPARTENTRY
SelectPartition(
IN PPARTLIST List,
IN ULONG DiskNumber,
PPARTENTRY
GetNextPartition(
- IN PPARTLIST List);
+ IN PPARTLIST List,
+ IN PPARTENTRY CurrentPart OPTIONAL);
PPARTENTRY
GetPrevPartition(
- IN PPARTLIST List);
+ IN PPARTLIST List,
+ IN PPARTENTRY CurrentPart OPTIONAL);
BOOLEAN
CreatePrimaryPartition(
IN ULONGLONG SectorCount,
IN BOOLEAN AutoCreate);
-VOID
+BOOLEAN
DeletePartition(
IN PPARTLIST List,
- IN PPARTENTRY PartEntry);
-
-VOID
-DeleteCurrentPartition(
- IN PPARTLIST List);
+ IN PPARTENTRY PartEntry,
+ OUT PPARTENTRY* FreeRegion OPTIONAL);
VOID
CheckActiveSystemPartition(
- IN PPARTLIST List);
+ IN PPARTLIST List,
+ IN BOOLEAN ForceSelect,
+ IN PDISKENTRY AlternateDisk OPTIONAL,
+ IN PPARTENTRY AlternatePart OPTIONAL);
NTSTATUS
WritePartitions(