Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Platform/OpenLegacyBoot/LegacyBootInternal.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ typedef enum OC_LEGACY_OS_TYPE_ {
OcLegacyOsTypeNone,
OcLegacyOsTypeWindowsNtldr,
OcLegacyOsTypeWindowsBootmgr,
OcLegacyOsTypeIsoLinux
OcLegacyOsTypeIsoLinux,
OcLegacyOsTypeGrldr
} OC_LEGACY_OS_TYPE;

EFI_STATUS
Expand Down
4 changes: 4 additions & 0 deletions Platform/OpenLegacyBoot/LegacyBootSupport.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,10 @@ InternalGetPartitionLegacyOsType (
|| CheckLegacySignature ("isolinux", Buffer, BufferSize))
{
LegacyOsType = OcLegacyOsTypeIsoLinux;
} else if ( CheckLegacySignature ("GRLDR", Buffer, BufferSize)
|| CheckLegacySignature ("grldr", Buffer, BufferSize))
{
LegacyOsType = OcLegacyOsTypeGrldr;
} else {
LegacyOsType = OcLegacyOsTypeNone;
DEBUG ((DEBUG_INFO, "OLB: Unknown legacy bootsector signature\n"));
Expand Down
20 changes: 19 additions & 1 deletion Platform/OpenLegacyBoot/OpenLegacyBoot.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,25 @@ GetLegacyEntryName (
OC_LEGACY_OS_TYPE LegacyOsType
)
{
return AllocateCopyPool (L_STR_SIZE ("Windows (legacy)"), "Windows (legacy)");
CONST CHAR8 *Name;

switch (LegacyOsType) {
case OcLegacyOsTypeIsoLinux:
Name = "Linux (legacy)";
break;

case OcLegacyOsTypeGrldr:
Name = "Grub4dos (legacy)";
break;

case OcLegacyOsTypeWindowsBootmgr:
case OcLegacyOsTypeWindowsNtldr:
default:
Name = "Windows (legacy)";
break;
}

return AllocateCopyPool (AsciiStrSize (Name), Name);
}

STATIC
Expand Down
Loading