[SETUPLIB][USETUP] Reduce duplicated code

- ScrollDownPartitionList() and ScrollUpPartitionList()
  --> ScrollUpDownPartitionList()

- GetPrimaryPartitionCount() and GetLogicalPartitionCount()
  --> generic GetPartitionCount() and macros.

- GetPrevUnpartitionedEntry() and GetNextUnpartitionedEntry()
  --> GetAdjUnpartitionedEntry() ("Adj" == Adjacent)
This commit is contained in:
Hermès Bélusca-Maïto 2024-07-04 15:28:53 +02:00
parent 97821f00d5
commit 7639cb750a
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
5 changed files with 73 additions and 122 deletions

View file

@ -702,9 +702,6 @@ ResolveArcNameManually(
BOOLEAN UseSignature;
SIZE_T NameLength;
PDISKENTRY DiskEntry;
PPARTENTRY PartEntry = NULL;
if (NtName->MaximumLength < sizeof(UNICODE_NULL))
return STATUS_BUFFER_TOO_SMALL;
@ -757,6 +754,9 @@ ResolveArcNameManually(
else
if (PeripheralType == RDiskPeripheral)
{
PDISKENTRY DiskEntry;
PPARTENTRY PartEntry = NULL;
if (UseSignature)
{
/* The disk signature is stored in AdapterKey */