File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ class REFIT_VOLUME {
6262
6363 const XStringW getVolLabelOrOSXVolumeNameOrVolName () {
6464 if ( VolLabel.notEmpty () ) return VolLabel;
65- // if ( osxVolumeName.notEmpty() ) return osxVolumeName; // not assigned
65+ if ( osxVolumeName.notEmpty () ) return osxVolumeName;
6666 return VolName;
6767 }
6868};
Original file line number Diff line number Diff line change @@ -466,6 +466,7 @@ STATIC XBool isFirstRootUUID(REFIT_VOLUME *Volume) {
466466}
467467
468468// Set Entry->VolName to .disk_label.contentDetails if it exists
469+ // Set Entry/Volume display name to .disk_label.contentDetails if it exists
469470STATIC EFI_STATUS GetOSXVolumeName (LOADER_ENTRY *Entry) {
470471 EFI_STATUS Status = EFI_NOT_FOUND;
471472 CONST CHAR16 *targetNameFile =
@@ -476,7 +477,10 @@ STATIC EFI_STATUS GetOSXVolumeName(LOADER_ENTRY *Entry) {
476477 Status = egLoadFile (Entry->Volume ->RootDir , targetNameFile,
477478 (UINT8 **)&fileBuffer, &fileLen);
478479 if (!EFI_ERROR (Status)) {
479- Entry->DisplayedVolName .strncpy (fileBuffer, fileLen);
480+ if (Entry->DisplayedVolName .isEmpty ()) {
481+ Entry->DisplayedVolName .strncpy (fileBuffer, fileLen);
482+ }
483+ Entry->Volume ->osxVolumeName .strncpy (fileBuffer, fileLen);
480484 DBG (" Created name:%ls\n " , Entry->DisplayedVolName .wc_str ());
481485
482486 FreePool (fileBuffer);
You can’t perform that action at this time.
0 commit comments