Skip to content

Commit

Permalink
** WIP ** Stuff of interest for partitioning / FS
Browse files Browse the repository at this point in the history
- Some more work on the partition list iteration

- Several fundamental changes in partition list, iterators,
  and split the FS volume-specific operations into its own file.

The splitting of FS volume-specific functions has been motivated
by what has been started in diskpart.
  • Loading branch information
HBelusca committed Oct 24, 2024
1 parent 90aee84 commit 36cd0cf
Show file tree
Hide file tree
Showing 9 changed files with 1,232 additions and 439 deletions.
25 changes: 7 additions & 18 deletions base/setup/lib/utils/osdetect.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,24 +186,13 @@ EnumerateInstallations(
}

/* Add the discovered NTOS installation into the list */
NtOsInstall = AddNTOSInstallation(Data->List,
BootEntry->FriendlyName,
Machine,
VendorName.Buffer, // FIXME: What if it's not NULL-terminated?
Options->OsLoadPath,
&SystemRootPath, PathComponent,
DiskNumber, PartitionNumber);
if (NtOsInstall)
{
/* Retrieve the volume corresponding to the disk and partition numbers */
PPARTENTRY PartEntry = SelectPartition(Data->PartList, DiskNumber, PartitionNumber);
if (!PartEntry)
{
DPRINT1("SelectPartition(disk #%d, partition #%d) failed\n",
DiskNumber, PartitionNumber);
}
NtOsInstall->Volume = (PartEntry ? PartEntry->Volume : NULL);
}
AddNTOSInstallation(Data->List,
BootEntry->FriendlyName,
Machine,
VendorName.Buffer, // FIXME: What if it's not NULL-terminated?
Options->OsLoadPath,
&SystemRootPath, PathComponent,
DiskNumber, PartitionNumber);

/* Continue the enumeration */
return STATUS_SUCCESS;
Expand Down
1 change: 0 additions & 1 deletion base/setup/lib/utils/osdetect.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ typedef struct _NTOS_INSTALLATION
PCWSTR PathComponent; // Pointer inside SystemNtPath.Buffer
ULONG DiskNumber;
ULONG PartitionNumber;
PVOLENTRY Volume; // PVOLINFO
WCHAR InstallationName[MAX_PATH];
WCHAR VendorName[MAX_PATH];
// CHAR Data[ANYSIZE_ARRAY];
Expand Down
Loading

0 comments on commit 36cd0cf

Please sign in to comment.