From: srs5694 Date: Mon, 18 Mar 2013 22:16:12 +0000 (-0400) Subject: 0.6.8 version. X-Git-Url: https://code.delx.au/refind/commitdiff_plain/2569172b598d42a95c1aeb3bde752358f0b43689 0.6.8 version. --- diff --git a/NEWS.txt b/NEWS.txt index ed90b3f..60935fc 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -1,5 +1,14 @@ -0.6.8 (?/?/2013): ------------------ +0.6.8 (3/18/2013): +------------------ + +- Added workaround for presumed EFI bug that was causing "Invalid + Parameter" errors when scanning for boot loaders on some computers. + +- Added search for an EFI shell called shell.efi in the root directory + (previously this name was only accepted in EFI\tools). + +- Fixed bug in install.sh that caused it to fail on some systems (Fedora + 18, for instance) because of a problem identifying the ESP. - Fixed bug that caused icons named after boot loaders to not be used. diff --git a/docs/refind/bootmode.html b/docs/refind/bootmode.html index c08bb36..c912023 100644 --- a/docs/refind/bootmode.html +++ b/docs/refind/bootmode.html @@ -14,8 +14,8 @@

by Roderick W. Smith, rodsmith@rodsbooks.com

-

Originally written: 3/14/2013; last Web page update: -2/3/2012, referencing rEFInd 0.6.7

+

Originally written: 3/14/2012; last Web page update: +3/18/2013, referencing rEFInd 0.6.8

I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!

diff --git a/docs/refind/configfile.html b/docs/refind/configfile.html index f32d333..6a49a25 100644 --- a/docs/refind/configfile.html +++ b/docs/refind/configfile.html @@ -15,7 +15,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

Originally written: 3/14/2012; last Web page update: -2/3/2013, referencing rEFInd 0.6.7

+3/18/2013, referencing rEFInd 0.6.8

I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!

diff --git a/docs/refind/drivers.html b/docs/refind/drivers.html index 579014c..cc8dd50 100644 --- a/docs/refind/drivers.html +++ b/docs/refind/drivers.html @@ -15,7 +15,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

Originally written: 4/19/2012; last Web page update: -2/3/2013, referencing rEFInd 0.6.7

+3/18/2013, referencing rEFInd 0.6.8

I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!

diff --git a/docs/refind/features.html b/docs/refind/features.html index c074c07..9d75cca 100644 --- a/docs/refind/features.html +++ b/docs/refind/features.html @@ -15,7 +15,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

Originally written: 3/14/2012; last Web page update: -2/3/2013, referencing rEFInd 0.6.7

+3/18/2013, referencing rEFInd 0.6.8

I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!

diff --git a/docs/refind/getting.html b/docs/refind/getting.html index 5416986..bf8e718 100644 --- a/docs/refind/getting.html +++ b/docs/refind/getting.html @@ -15,7 +15,7 @@ F href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

Originally written: 3/14/2012; last Web page update: -2/8/2013, referencing rEFInd 0.6.7

+3/18/2013, referencing rEFInd 0.6.8

I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!

@@ -98,7 +98,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

  • Additional programs diff --git a/docs/refind/installing.html b/docs/refind/installing.html index 733f7b6..bf62d5b 100644 --- a/docs/refind/installing.html +++ b/docs/refind/installing.html @@ -15,7 +15,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

    Originally written: 3/14/2012; last Web page update: -2/11/2013, referencing rEFInd 0.6.7

    +3/18/2013, referencing rEFInd 0.6.8

    I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!

    diff --git a/docs/refind/linux.html b/docs/refind/linux.html index 0b88e5a..18768f5 100644 --- a/docs/refind/linux.html +++ b/docs/refind/linux.html @@ -15,7 +15,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

    Originally written: 3/19/2012; last Web page update: -2/3/2013, referencing rEFInd 0.6.7

    +3/18/2013, referencing rEFInd 0.6.8

    I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!

    diff --git a/docs/refind/revisions.html b/docs/refind/revisions.html index 6afc69d..b05ec6f 100644 --- a/docs/refind/revisions.html +++ b/docs/refind/revisions.html @@ -14,7 +14,7 @@

    by Roderick W. Smith, rodsmith@rodsbooks.com

    -

    Last Web page update: 2/3/2013

    +

    Last Web page update: 3/18/2013

    I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!

    @@ -92,6 +92,8 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

  • New features I'd like to add: diff --git a/docs/refind/using.html b/docs/refind/using.html index ebb2acf..cd37ea4 100644 --- a/docs/refind/using.html +++ b/docs/refind/using.html @@ -15,7 +15,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

    Originally written: 3/14/2012; last Web page update: -2/3/2013, referencing rEFInd 0.6.7

    +3/18/2013, referencing rEFInd 0.6.8

    I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!

    diff --git a/filesystems/fsw_efi.c b/filesystems/fsw_efi.c index 6ac67f4..67c7186 100644 --- a/filesystems/fsw_efi.c +++ b/filesystems/fsw_efi.c @@ -98,7 +98,7 @@ EFI_GUID gEfiFileSystemVolumeLabelInfoIdGuid = EFI_FILE_SYSTEM_VOLUME_LABEL_INFO /** Helper macro for stringification. */ #define FSW_EFI_STRINGIFY(x) #x /** Expands to the EFI driver name given the file system type name. */ -#define FSW_EFI_DRIVER_NAME(t) L"rEFInd 0.6.7 " FSW_EFI_STRINGIFY(t) L" File System Driver" +#define FSW_EFI_DRIVER_NAME(t) L"rEFInd 0.6.8 " FSW_EFI_STRINGIFY(t) L" File System Driver" // function prototypes diff --git a/install.sh b/install.sh index 1e66871..4d0c398 100755 --- a/install.sh +++ b/install.sh @@ -29,6 +29,7 @@ # # Revision history: # +# 0.6.8 -- Bug fix: ESP scan now uses "uniq". # 0.6.6 -- Bug fix: Upgrade drivers when installed to EFI/BOOT. Also enable # copying shim.efi and MokManager.efi over themselves. # 0.6.4 -- Copies ext2 driver rather than ext4 driver for ext2/3fs @@ -594,7 +595,7 @@ FindLinuxESP() { fi InstallDir=`echo $EspLine | cut -d " " -f 6` if [[ -n $InstallDir ]] ; then - EspFilesystem=`grep $InstallDir /etc/mtab | cut -d " " -f 3` + EspFilesystem=`grep $InstallDir /etc/mtab | uniq | cut -d " " -f 3` fi if [[ $EspFilesystem != 'vfat' ]] ; then echo "$RootDir/boot/efi doesn't seem to be on a VFAT filesystem. The ESP must be" diff --git a/libeg/image.c b/libeg/image.c index 88829a5..c529da9 100644 --- a/libeg/image.c +++ b/libeg/image.c @@ -85,9 +85,10 @@ EG_IMAGE * egCreateFilledImage(IN UINTN Width, IN UINTN Height, IN BOOLEAN HasAl EG_IMAGE * egCopyImage(IN EG_IMAGE *Image) { - EG_IMAGE *NewImage; + EG_IMAGE *NewImage = NULL; - NewImage = egCreateImage(Image->Width, Image->Height, Image->HasAlpha); + if (Image != NULL) + NewImage = egCreateImage(Image->Width, Image->Height, Image->HasAlpha); if (NewImage == NULL) return NULL; diff --git a/mkcdimage b/mkcdimage index 4dc8b0b..934199a 100755 --- a/mkcdimage +++ b/mkcdimage @@ -65,7 +65,7 @@ mkdosfs -n "ElTorito" refind-bin-$Version.img mcopy -irefind-bin-$Version.img -s EFI shell*.efi ::/ # Make the ISO-9660 image file.... -mkisofs -A "Bootable rEFInd" -V "rEFInd $Version" -volset "rEFInd $Version" \ +mkisofs -A "Bootable rEFInd" -V "rEFInd_$Version" -volset "rEFInd_$Version" \ -J -r -v -x ./lost+found -o ../../refind-cd-$Version.iso \ -eltorito-alt-boot -efi-boot refind-bin-$Version.img \ -no-emul-boot ./ diff --git a/refind.spec b/refind.spec index d4b0fe9..4ba63f7 100644 --- a/refind.spec +++ b/refind.spec @@ -1,6 +1,6 @@ Summary: EFI boot manager software Name: refind -Version: 0.6.7 +Version: 0.6.8 Release: 1%{?dist} Summary: EFI boot manager software License: GPLv3 diff --git a/refind/config.c b/refind/config.c index c18e979..871b0e6 100644 --- a/refind/config.c +++ b/refind/config.c @@ -497,6 +497,9 @@ VOID ReadConfig(CHAR16 *FileName) else GlobalConfig.RequestedScreenHeight = 0; + } else if (StriCmp(TokenList[0], L"screensaver") == 0) { + HandleInt(TokenList, TokenCount, &(GlobalConfig.ScreensaverTime)); + } else if (StriCmp(TokenList[0], L"use_graphics_for") == 0) { GlobalConfig.GraphicsFor = 0; for (i = 1; i < TokenCount; i++) { diff --git a/refind/global.h b/refind/global.h index edf9244..0aad5f1 100644 --- a/refind/global.h +++ b/refind/global.h @@ -229,6 +229,7 @@ typedef struct { UINTN GraphicsFor; UINTN LegacyType; UINTN ScanDelay; + UINTN ScreensaverTime; CHAR16 *BannerFileName; EG_IMAGE *ScreenBackground; CHAR16 *SelectionSmallFileName; diff --git a/refind/lib.c b/refind/lib.c index 66dbe00..601038c 100644 --- a/refind/lib.c +++ b/refind/lib.c @@ -1151,13 +1151,15 @@ EFI_STATUS DirNextEntry(IN EFI_FILE *Directory, IN OUT EFI_FILE_INFO **DirEntry, LastBufferSize = BufferSize; } if (EFI_ERROR(Status)) { - FreePool(Buffer); + MyFreePool(Buffer); + Buffer = NULL; break; } // check for end of listing if (BufferSize == 0) { // end of directory listing - FreePool(Buffer); + MyFreePool(Buffer); + Buffer = NULL; break; } @@ -1273,7 +1275,6 @@ BOOLEAN DirIterNext(IN OUT REFIT_DIR_ITER *DirIter, IN UINTN FilterMode, IN CHAR while (KeepGoing && (OnePattern = FindCommaDelimited(FilePattern, i++)) != NULL) { if (MetaiMatch(DirIter->LastFileInfo->FileName, OnePattern)) KeepGoing = FALSE; -// Print(L"%s did%s match %s\n", DirIter->LastFileInfo->FileName, KeepGoing ? L" not" : L"", OnePattern); } // while // else continue loop } else diff --git a/refind/main.c b/refind/main.c index d115ae2..ba1d850 100644 --- a/refind/main.c +++ b/refind/main.c @@ -66,17 +66,17 @@ #define MACOSX_LOADER_PATH L"System\\Library\\CoreServices\\boot.efi" #if defined (EFIX64) -#define SHELL_NAMES L"\\EFI\\tools\\shell.efi,\\EFI\\tools\\shellx64.efi,\\shellx64.efi" +#define SHELL_NAMES L"\\EFI\\tools\\shell.efi,\\EFI\\tools\\shellx64.efi,\\shell.efi,\\shellx64.efi" #define DRIVER_DIRS L"drivers,drivers_x64" #define FALLBACK_FULLNAME L"EFI\\BOOT\\bootx64.efi" #define FALLBACK_BASENAME L"bootx64.efi" #elif defined (EFI32) -#define SHELL_NAMES L"\\EFI\\tools\\shell.efi,\\EFI\\tools\\shellia32.efi,\\shellia32.efi" +#define SHELL_NAMES L"\\EFI\\tools\\shell.efi,\\EFI\\tools\\shellia32.efi,\\shell.efi,\\shellia32.efi" #define DRIVER_DIRS L"drivers,drivers_ia32" #define FALLBACK_FULLNAME L"EFI\\BOOT\\bootia32.efi" #define FALLBACK_BASENAME L"bootia32.efi" #else -#define SHELL_NAMES L"\\EFI\\tools\\shell.efi" +#define SHELL_NAMES L"\\EFI\\tools\\shell.efi,\\shell.efi" #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 */ @@ -110,7 +110,7 @@ static REFIT_MENU_SCREEN MainMenu = { L"Main Menu", NULL, 0, NULL, 0, NULL L"Insert or F2 for more options; Esc to refresh" }; static REFIT_MENU_SCREEN AboutMenu = { L"About", NULL, 0, NULL, 0, NULL, 0, NULL, L"Press Enter to return to main menu", L"" }; -REFIT_CONFIG GlobalConfig = { FALSE, FALSE, 0, 0, 0, DONT_CHANGE_TEXT_MODE, 20, 0, 0, GRAPHICS_FOR_OSX, LEGACY_TYPE_MAC, 0, +REFIT_CONFIG GlobalConfig = { FALSE, FALSE, 0, 0, 0, DONT_CHANGE_TEXT_MODE, 20, 0, 0, GRAPHICS_FOR_OSX, LEGACY_TYPE_MAC, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, {TAG_SHELL, TAG_APPLE_RECOVERY, TAG_MOK_TOOL, TAG_ABOUT, TAG_SHUTDOWN, TAG_REBOOT, 0, 0, 0, 0, 0 }}; @@ -132,7 +132,7 @@ static VOID AboutrEFInd(VOID) if (AboutMenu.EntryCount == 0) { AboutMenu.TitleImage = BuiltinIcon(BUILTIN_ICON_FUNC_ABOUT); - AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.6.7.1"); + AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.6.8"); AddMenuInfoLine(&AboutMenu, L""); AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2006-2010 Christoph Pfisterer"); AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2012 Roderick W. Smith"); @@ -1064,21 +1064,27 @@ static BOOLEAN ScanLoaderDir(IN REFIT_VOLUME *Volume, IN CHAR16 *Path, IN CHAR16 } // if MyFreePool(Extension); } // while + NewLoader = LoaderList; while (NewLoader != NULL) { AddLoaderEntry(NewLoader->FileName, NULL, Volume); NewLoader = NewLoader->NextEntry; } // while + CleanUpLoaderList(LoaderList); Status = DirIterClose(&DirIter); - if (Status != EFI_NOT_FOUND) { + // NOTE: EFI_INVALID_PARAMETER really is an error that should be reported; + // but I've gotten reports from users who are getting this error occasionally + // and I can't find anything wrong or reproduce the problem, so I'm putting + // it down to buggy EFI implementations and ignoring that particular error.... + if ((Status != EFI_NOT_FOUND) && (Status != EFI_INVALID_PARAMETER)) { if (Path) SPrint(FileName, 255, L"while scanning the %s directory", Path); else StrCpy(FileName, L"while scanning the root directory"); CheckError(Status, FileName); } // if (Status != EFI_NOT_FOUND) - } // if not scanning our own directory + } // if not scanning a blacklisted directory return FoundFallbackDuplicate; } /* static VOID ScanLoaderDir() */ @@ -1091,11 +1097,9 @@ static VOID ScanEfiFiles(REFIT_VOLUME *Volume) { UINTN i, Length; BOOLEAN ScanFallbackLoader = TRUE; -// Print(L"Entering ScanEfiFiles(), GlobalConfig.ScanAllLinux = %s\n", GlobalConfig.ScanAllLinux ? L"TRUE" : L"FALSE"); MatchPatterns = StrDuplicate(LOADER_MATCH_PATTERNS); if (GlobalConfig.ScanAllLinux) MergeStrings(&MatchPatterns, LINUX_MATCH_PATTERNS, L','); -// Print(L"MatchPatterns = '%s'\n", MatchPatterns); if ((Volume->RootDir != NULL) && (Volume->VolName != NULL)) { // check for Mac OS X boot loader diff --git a/refind/menu.c b/refind/menu.c index 668b646..ff8f1a6 100644 --- a/refind/menu.c +++ b/refind/menu.c @@ -412,8 +412,9 @@ static UINTN RunGenericMenu(IN REFIT_MENU_SCREEN *Screen, IN MENU_STYLE_FUNC Sty } else if (HaveTimeout) { refit_call1_wrapper(BS->Stall, 100000); // Pause for 100 ms TimeoutCountdown--; - } else + } else { refit_call3_wrapper(BS->WaitForEvent, 1, &ST->ConIn->WaitForKey, &index); + } continue; } if (HaveTimeout) {