]> code.delx.au - refind/blobdiff - refind/lib.c
Fixed BIOS-booting bugs on Macs. Version 0.7.3 release.
[refind] / refind / lib.c
index f0b0e6f169fd0dd882cf650090d75bd65be1e195..6d09f023872aa845daa69a946a24ac45c781e3d3 100644 (file)
@@ -638,7 +638,7 @@ static VOID ScanVolumeBootcode(REFIT_VOLUME *Volume, BOOLEAN *Bootable)
 } /* VOID ScanVolumeBootcode() */
 
 // Set default volume badge icon based on /.VolumeBadge.{icns|png} file or disk kind
-static VOID SetVolumeBadgeIcon(IN OUT REFIT_VOLUME *Volume)
+VOID SetVolumeBadgeIcon(REFIT_VOLUME *Volume)
 {
    if (Volume->VolBadgeImage == NULL) {
       Volume->VolBadgeImage = egLoadIconAnyType(Volume->RootDir, L"", L".VolumeBadge", 128);
@@ -853,6 +853,10 @@ VOID ScanVolume(REFIT_VOLUME *Volume)
 
     // open the root directory of the volume
     Volume->RootDir = LibOpenRoot(Volume->DeviceHandle);
+
+    // Set volume icon based on .VolumeBadge icon or disk kind
+    SetVolumeBadgeIcon(Volume);
+
     if (Volume->RootDir == NULL) {
         Volume->IsReadable = FALSE;
         return;
@@ -862,9 +866,6 @@ VOID ScanVolume(REFIT_VOLUME *Volume)
 
     Volume->VolName = GetVolumeName(Volume);
 
-    // Set volume icon based on .VolumeBadge icon or disk kind
-    SetVolumeBadgeIcon(Volume);
-
     // get custom volume icons if present
     if (!Volume->VolIconImage)
        Volume->VolIconImage = egLoadIconAnyType(Volume->RootDir, L"", L".VolumeIcon", 128);