From 5b1c2a8e33dd37ae52c9304c81cb77695f529a58 Mon Sep 17 00:00:00 2001 From: YBronst Date: Wed, 25 Feb 2026 00:05:40 +0200 Subject: [PATCH] Fixed a regression in the Volume display name function. Meaningless gibberish in disk partition titles has been removed. --- rEFIt_UEFI/Platform/Volume.h | 2 +- rEFIt_UEFI/entry_scan/loader.cpp | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/rEFIt_UEFI/Platform/Volume.h b/rEFIt_UEFI/Platform/Volume.h index 1024c3a1a2..5210f85183 100644 --- a/rEFIt_UEFI/Platform/Volume.h +++ b/rEFIt_UEFI/Platform/Volume.h @@ -62,7 +62,7 @@ class REFIT_VOLUME { const XStringW getVolLabelOrOSXVolumeNameOrVolName() { if ( VolLabel.notEmpty() ) return VolLabel; -// if ( osxVolumeName.notEmpty() ) return osxVolumeName; // not assigned + if ( osxVolumeName.notEmpty() ) return osxVolumeName; return VolName; } }; diff --git a/rEFIt_UEFI/entry_scan/loader.cpp b/rEFIt_UEFI/entry_scan/loader.cpp index 1a51313ea0..a14027c1bf 100644 --- a/rEFIt_UEFI/entry_scan/loader.cpp +++ b/rEFIt_UEFI/entry_scan/loader.cpp @@ -466,6 +466,7 @@ STATIC XBool isFirstRootUUID(REFIT_VOLUME *Volume) { } // Set Entry->VolName to .disk_label.contentDetails if it exists +// Set Entry/Volume display name to .disk_label.contentDetails if it exists STATIC EFI_STATUS GetOSXVolumeName(LOADER_ENTRY *Entry) { EFI_STATUS Status = EFI_NOT_FOUND; CONST CHAR16 *targetNameFile = @@ -476,7 +477,10 @@ STATIC EFI_STATUS GetOSXVolumeName(LOADER_ENTRY *Entry) { Status = egLoadFile(Entry->Volume->RootDir, targetNameFile, (UINT8 **)&fileBuffer, &fileLen); if (!EFI_ERROR(Status)) { - Entry->DisplayedVolName.strncpy(fileBuffer, fileLen); + if (Entry->DisplayedVolName.isEmpty()) { + Entry->DisplayedVolName.strncpy(fileBuffer, fileLen); + } + Entry->Volume->osxVolumeName.strncpy(fileBuffer, fileLen); DBG("Created name:%ls\n", Entry->DisplayedVolName.wc_str()); FreePool(fileBuffer);