[SETUPLIB][USETUP] Minor improvements.

- Make some partitioning functions not dependent on the selected "CurrentPartition".
- Add some sanity checks.
- Improve some of the "is-partitioned" checks.
This commit is contained in:
Hermès Bélusca-Maïto 2019-02-24 19:04:57 +01:00
parent c1fbc2d651
commit 29cc1843d0
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
5 changed files with 155 additions and 94 deletions

View file

@ -697,6 +697,8 @@ FindNTOSInstallations(
ULONG Version;
WCHAR PathBuffer[MAX_PATH];
ASSERT(PartEntry->IsPartitioned && PartEntry->PartitionNumber != 0);
/* Set PartitionRootPath */
RtlStringCchPrintfW(PathBuffer, ARRAYSIZE(PathBuffer),
L"\\Device\\Harddisk%lu\\Partition%lu\\",