X-Git-Url: https://code.delx.au/refind/blobdiff_plain/37c98e1a4e30f80d6a7f7158bc27c81a1c3cac37..480ba418c97ece5557ac0efc5dc189ff19fb8b8f:/refind/main.c diff --git a/refind/main.c b/refind/main.c index c215962..881ac38 100644 --- a/refind/main.c +++ b/refind/main.c @@ -134,8 +134,8 @@ EFI_GUID gFreedesktopRootGuid = { 0xb921b045, 0x1df0, 0x41c3, { 0xaf, 0x44, 0x4c #define DRIVER_DIRS L"drivers" #define FALLBACK_FULLNAME L"EFI\\BOOT\\boot.efi" /* Not really correct */ #define FALLBACK_BASENAME L"boot.efi" /* Not really correct */ -// Below is GUID for ARM64 -EFI_GUID gFreedesktopRootGuid = { 0xb921b045, 0x1df0, 0x41c3, { 0xaf, 0x44, 0x4c, 0x6f, 0x28, 0x0d, 0x3f, 0xae }}; +// Below is GUID for ARM32 +EFI_GUID gFreedesktopRootGuid = { 0x69dad710, 0x2ce4, 0x4e3c, { 0xb1, 0x6c, 0x21, 0xa1, 0xd4, 0x9a, 0xbe, 0xd3 }}; #endif #define FAT_ARCH 0x0ef1fab9 /* ID for Apple "fat" binary */ @@ -204,7 +204,7 @@ static VOID AboutrEFInd(VOID) if (AboutMenu.EntryCount == 0) { AboutMenu.TitleImage = BuiltinIcon(BUILTIN_ICON_FUNC_ABOUT); - AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.10.0.5"); + AddMenuInfoLine(&AboutMenu, PoolPrint(L"rEFInd Version %s", REFIND_VERSION)); AddMenuInfoLine(&AboutMenu, L""); AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2006-2010 Christoph Pfisterer"); AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2012-2015 Roderick W. Smith"); @@ -1177,16 +1177,22 @@ INTN TimeComp(IN EFI_TIME *Time1, IN EFI_TIME *Time2) { return 0; } // INTN TimeComp() -// Adds a loader list element, keeping it sorted by date. Returns the new -// first element (the one with the most recent date). +// Adds a loader list element, keeping it sorted by date. EXCEPTION: Fedora's rescue +// kernel, which begins with "vmlinuz-0-rescue," should not be at the top of the list, +// since that will make it the default if kernel folding is enabled, so float it to +// the end. +// Returns the new first element (the one with the most recent date). static struct LOADER_LIST * AddLoaderListEntry(struct LOADER_LIST *LoaderList, struct LOADER_LIST *NewEntry) { struct LOADER_LIST *LatestEntry, *CurrentEntry, *PrevEntry = NULL; + BOOLEAN LinuxRescue = FALSE; LatestEntry = CurrentEntry = LoaderList; if (LoaderList == NULL) { LatestEntry = NewEntry; } else { - while ((CurrentEntry != NULL) && (TimeComp(&(NewEntry->TimeStamp), &(CurrentEntry->TimeStamp)) < 0)) { + if (StriSubCmp(L"vmlinuz-0-rescue", NewEntry->FileName)) + LinuxRescue = TRUE; + while ((CurrentEntry != NULL) && (LinuxRescue || (TimeComp(&(NewEntry->TimeStamp), &(CurrentEntry->TimeStamp)) < 0))) { PrevEntry = CurrentEntry; CurrentEntry = CurrentEntry->NextEntry; } // while @@ -2210,6 +2216,7 @@ efi_main (EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) LoadDrivers(); ScanVolumes(); // Do before ReadConfig() because it needs SelfVolume->VolName ReadConfig(GlobalConfig.ConfigFilename); + SetVolumeIcons(); if (GlobalConfig.SpoofOSXVersion && GlobalConfig.SpoofOSXVersion[0] != L'\0') SetAppleOSInfo();