mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2025-01-07 18:48:04 +01:00
remember handle index
Signed-off-by: SergeySlice <sergey.slice@gmail.com>
This commit is contained in:
parent
dba6587447
commit
ede47c040b
@ -57,6 +57,7 @@ public:
|
|||||||
XString8 ApfsContainerUUID = XString8();
|
XString8 ApfsContainerUUID = XString8();
|
||||||
APPLE_APFS_VOLUME_ROLE ApfsRole = 0;
|
APPLE_APFS_VOLUME_ROLE ApfsRole = 0;
|
||||||
XString8Array ApfsTargetUUIDArray = XString8Array(); // this is the array of folders that are named as UUID
|
XString8Array ApfsTargetUUIDArray = XString8Array(); // this is the array of folders that are named as UUID
|
||||||
|
UINTN Index = 0;
|
||||||
|
|
||||||
REFIT_VOLUME() {};
|
REFIT_VOLUME() {};
|
||||||
REFIT_VOLUME(const REFIT_VOLUME& other) = delete; // Can be defined if needed
|
REFIT_VOLUME(const REFIT_VOLUME& other) = delete; // Can be defined if needed
|
||||||
|
@ -962,7 +962,7 @@ void ScanVolumes(void)
|
|||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
UINTN HandleCount = 0;
|
UINTN HandleCount = 0;
|
||||||
UINTN HandleIndex;
|
// UINTN HandleIndex;
|
||||||
EFI_HANDLE *Handles = NULL;
|
EFI_HANDLE *Handles = NULL;
|
||||||
REFIT_VOLUME *WholeDiskVolume;
|
REFIT_VOLUME *WholeDiskVolume;
|
||||||
UINTN VolumeIndex, VolumeIndex2;
|
UINTN VolumeIndex, VolumeIndex2;
|
||||||
@ -983,7 +983,7 @@ void ScanVolumes(void)
|
|||||||
return;
|
return;
|
||||||
DBG("Found %llu volumes with blockIO\n", HandleCount);
|
DBG("Found %llu volumes with blockIO\n", HandleCount);
|
||||||
// first pass: collect information about all handles
|
// first pass: collect information about all handles
|
||||||
for (HandleIndex = 0; HandleIndex < HandleCount; HandleIndex++) {
|
for (UINT32 HandleIndex = 0; HandleIndex < HandleCount; HandleIndex++) {
|
||||||
|
|
||||||
REFIT_VOLUME* Volume = new REFIT_VOLUME;
|
REFIT_VOLUME* Volume = new REFIT_VOLUME;
|
||||||
Volume->LegacyOS = new LEGACY_OS;
|
Volume->LegacyOS = new LEGACY_OS;
|
||||||
@ -998,6 +998,7 @@ void ScanVolumes(void)
|
|||||||
|
|
||||||
Status = ScanVolume(Volume);
|
Status = ScanVolume(Volume);
|
||||||
if (!EFI_ERROR(Status)) {
|
if (!EFI_ERROR(Status)) {
|
||||||
|
Volume->Index = HandleIndex;
|
||||||
Volumes.AddReference(Volume, false);
|
Volumes.AddReference(Volume, false);
|
||||||
for (size_t HVi = 0; HVi < gSettings.GUI.HVHideStrings.size(); HVi++) {
|
for (size_t HVi = 0; HVi < gSettings.GUI.HVHideStrings.size(); HVi++) {
|
||||||
if ( Volume->DevicePathString.containsIC(gSettings.GUI.HVHideStrings[HVi]) ||
|
if ( Volume->DevicePathString.containsIC(gSettings.GUI.HVHideStrings[HVi]) ||
|
||||||
|
Loading…
Reference in New Issue
Block a user