]> code.delx.au - refind/blobdiff - refind/lib.c
Support for memtest86 as a second-row item.
[refind] / refind / lib.c
index f0b0e6f169fd0dd882cf650090d75bd65be1e195..2e06c96aa2d58f4dc511ec79e825f58990b5beda 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * refit/lib.c
+ * refind/lib.c
  * General library functions
  *
  * Copyright (c) 2006-2009 Christoph Pfisterer
@@ -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);