0.2.3 (?/??/2012):
------------------
+- Fixed (maybe) a bug that caused hangs when launching a second program
+ after returning from a first. There are some weird system-to-system
+ differences, though, and this fix causes (apparently harmless) error
+ messages about "(re)opening our installation volume" on at least one
+ system (a 32-bit Mac Mini). I'm committing this change because, imperfect
+ though it is, it's preferable to the earlier version, at least on my
+ small sample of computers.
+
- Because of news that the Linux kernel developers are planning to use the
filename linux.conf to hold Linux kernel configuration data for EFI
booting, I'm transitioning rEFInd away from that name and to
<li>The code could be more flexible in its handling of the sizes of various graphical elements, and particularly drawn text. Prior to version 0.2.2, submenu text was invisible on UEFI-based PCs with 800x600 and smaller displays because of an inability to properly crop the graphics fields that hold the text. With version 0.2.2, I've put a band-aid on this problem by reducing the field size so that it now works on 800x600 displays, but smaller displays still suffer from this problem. This is just an example of the inflexibility of certain layout issues within rEFInd.</li>
-<li>On some (but not all) EFIs, launching a program from rEFInd, exiting that program, and then launching another program from rEFInd results in a system hang. This should obviously be fixed; it makes it hard to use a shell and then launch an OS without rebooting, or to exit from a loader that permits exiting.</li>
-
<li>I want to be able to specify the volume on which a boot loader resides in <tt>refind.conf</tt>. (As it is, manually-defined options can only launch boot loader files on the same volume as rEFInd.)</li>
<li>It would be useful to be able to specify paths to boot loaders and/or initial RAM disks relative to the rEFInd directory (or the boot loader's directory, in the case of initrds).</li>
VOID UninitRefitLib(VOID)
{
UninitVolumes();
-
+
if (SelfDir != NULL) {
refit_call1_wrapper(SelfDir->Close, SelfDir);
SelfDir = NULL;
}
-
+
if (SelfRootDir != NULL) {
- refit_call1_wrapper(SelfRootDir->Close, SelfRootDir);
- SelfRootDir = NULL;
+ refit_call1_wrapper(SelfRootDir->Close, SelfRootDir);
+ SelfRootDir = NULL;
}
}
EFI_STATUS ReinitRefitLib(VOID)
{
ReinitVolumes();
-
- if (SelfVolume != NULL && SelfVolume->RootDir != NULL)
- SelfRootDir = SelfVolume->RootDir;
-
+
+ // Below two lines were in rEFIt, but seem to cause problems on
+ // most systems. OTOH, my Mac Mini produces (apparently harmless)
+ // errors about "(re)opening our installation volume" (see the
+ // next function) when returning from programs when these two lines
+ // are removed. On the gripping hand, the Mac SOMETIMES crashes
+ // when launching a second program even with these lines removed.
+ // TODO: Figure out cause of above weirdness and fix it more
+ // reliably!
+ /* if (SelfVolume != NULL && SelfVolume->RootDir != NULL)
+ SelfRootDir = SelfVolume->RootDir; */
+
return FinishInitRefitLib();
}
{
if (AboutMenu.EntryCount == 0) {
AboutMenu.TitleImage = BuiltinIcon(BUILTIN_ICON_FUNC_ABOUT);
- AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.2.2.1");
+ AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.2.2.2");
AddMenuInfoLine(&AboutMenu, L"");
AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2006-2010 Christoph Pfisterer");
AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2012 Roderick W. Smith");
AddMenuInfoLine(&AboutMenu, L"");
AddMenuInfoLine(&AboutMenu, L"Running on:");
AddMenuInfoLine(&AboutMenu, PoolPrint(L" EFI Revision %d.%02d",
- ST->Hdr.Revision >> 16, ST->Hdr.Revision & ((1 << 16) - 1)));
+ ST->Hdr.Revision >> 16, ST->Hdr.Revision & ((1 << 16) - 1)));
#if defined(EFI32)
AddMenuInfoLine(&AboutMenu, L" Platform: x86 (32 bit)");
#elif defined(EFIX64)
// set load options
if (LoadOptions != NULL) {
- ReturnStatus = Status = refit_call3_wrapper(BS->HandleProtocol, ChildImageHandle, &LoadedImageProtocol, (VOID **) &ChildLoadedImage);
+ ReturnStatus = Status = refit_call3_wrapper(BS->HandleProtocol, ChildImageHandle, &LoadedImageProtocol, (VOID **) &ChildLoadedImage);
if (CheckError(Status, L"while getting a LoadedImageProtocol handle")) {
if (ErrorInStep != NULL)
*ErrorInStep = 2;
goto bailout_unload;
}
-
+
if (LoadOptionsPrefix != NULL) {
FullLoadOptions = PoolPrint(L"%s %s ", LoadOptionsPrefix, LoadOptions);
// NOTE: That last space is also added by the EFI shell and seems to be significant
static VOID StartLoader(IN LOADER_ENTRY *Entry)
{
+ UINTN ErrorInStep = 0;
+
BeginExternalScreen(Entry->UseGraphicsMode, L"Booting OS");
StartEFIImage(Entry->DevicePath, Entry->LoadOptions,
- Basename(Entry->LoaderPath), Basename(Entry->LoaderPath), NULL);
+ Basename(Entry->LoaderPath), Basename(Entry->LoaderPath), &ErrorInStep);
FinishExternalScreen();
}