[SETUPLIB][USETUP] Remove CurrentDisk/Partition from the partlist lib code, and move these into the UI code.

- Add also some validation ASSERTs and simplify the code here and there.

- The installation partition is called "InstallPartition", while the
  global "CurrentPartition" is the disk region currently selected in
  the partition UI list, on which prtitioning operations are effectued.

- Extend CheckActiveSystemPartition() to use an optional alternative
  disk or partition in case the actual system partition (present in the
  first disk) cannot be used, e.g. because we don't support writes on it.
This commit is contained in:
Hermès Bélusca-Maïto 2019-03-05 01:42:33 +01:00
parent 0d9ebb67ce
commit 84f3e2df5d
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
8 changed files with 383 additions and 356 deletions

View file

@ -624,11 +624,11 @@ NTSTATUS
InitDestinationPaths(
IN OUT PUSETUP_DATA pSetupData,
IN PCWSTR InstallationDir,
IN PDISKENTRY DiskEntry, // FIXME: HACK!
IN PPARTENTRY PartEntry) // FIXME: HACK!
{
WCHAR PathBuffer[MAX_PATH];
NTSTATUS Status;
PDISKENTRY DiskEntry = PartEntry->DiskEntry;
WCHAR PathBuffer[MAX_PATH];
ASSERT(PartEntry->IsPartitioned && PartEntry->PartitionNumber != 0);