From: srs5694 Date: Tue, 4 Dec 2012 05:03:40 +0000 (-0500) Subject: Fixed bug in options line editor that caused unedited lines to be returned as X-Git-Url: https://code.delx.au/refind/commitdiff_plain/c965a3bde0196b74d77b8681b76369aba0f4e657 Fixed bug in options line editor that caused unedited lines to be returned as empty. --- diff --git a/NEWS.txt b/NEWS.txt index e90f0e2..71e0a39 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -1,6 +1,9 @@ -0.4.8 (??/??/2012): +0.5.0 (??/??/2012): ------------------- +- Fixed a bug that caused the options line editor to blank out lines that + were not actually edited. + - Added support for using Matthew Garrett's Shim program and its Machine Owner Keys (MOKs) to extend Secure Boot capabilities. If rEFInd is launched from Shim on a computer with Secure Boot active, rEFInd will @@ -21,7 +24,7 @@ entry if it's installed as EFI/Microsoft/boot/bootmgfw.efi. - Added support for launching MokManager.efi for managing the Machine Owner - Keys (MOKs) maintained by the Shim boot loader developed by Fedora and + Keys (MOKs) maintained by the shim boot loader developed by Fedora and SUSE. This program is scanned and presented as a second-row tool. - Added support for Apple's Recovery HD partition: If it's detected, a new diff --git a/refind/config.c b/refind/config.c index 258aa06..c22b830 100644 --- a/refind/config.c +++ b/refind/config.c @@ -649,7 +649,7 @@ static LOADER_ENTRY * AddStanzaEntries(REFIT_FILE *File, REFIT_VOLUME *Volume, C return(Entry); } // static VOID AddStanzaEntries() -// Read the user-configured loaders file, refind_loaders.conf, and add or delete +// Read the user-configured menu entries from refind.conf and add or delete // entries based on the contents of that file.... VOID ScanUserConfigured(VOID) { @@ -660,6 +660,7 @@ VOID ScanUserConfigured(VOID) CHAR16 *Title = NULL; UINTN TokenCount, size; LOADER_ENTRY *Entry; +// REFIT_MENU_SCREEN *SubScreen; if (FileExists(SelfDir, CONFIG_FILE_NAME)) { Status = ReadFile(SelfDir, CONFIG_FILE_NAME, &File, &size); diff --git a/refind/main.c b/refind/main.c index d01291d..5439188 100644 --- a/refind/main.c +++ b/refind/main.c @@ -118,7 +118,7 @@ static VOID AboutrEFInd(VOID) if (AboutMenu.EntryCount == 0) { AboutMenu.TitleImage = BuiltinIcon(BUILTIN_ICON_FUNC_ABOUT); - AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.4.7.7"); + AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.4.7.8"); AddMenuInfoLine(&AboutMenu, L""); AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2006-2010 Christoph Pfisterer"); AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2012 Roderick W. Smith"); diff --git a/refind/menu.c b/refind/menu.c index 5f76da4..a6e72ad 100644 --- a/refind/menu.c +++ b/refind/menu.c @@ -923,7 +923,6 @@ VOID MainMenuStyle(IN REFIT_MENU_SCREEN *Screen, IN SCROLL_STATE *State, IN UINT static BOOLEAN EditOptions(LOADER_ENTRY *MenuEntry) { UINTN x_max, y_max; CHAR16 *EditedOptions; -// CHAR16 message[] = L"Use cursor keys to edit, Esc to exit, Enter to boot with edited options"; EG_PIXEL DarkBackgroundPixel = { 0x0, 0x0, 0x0, 0 }; BOOLEAN retval = FALSE; @@ -935,7 +934,6 @@ static BOOLEAN EditOptions(LOADER_ENTRY *MenuEntry) { egClearScreen(&DarkBackgroundPixel); refit_call3_wrapper(ST->ConOut->SetCursorPosition, ST->ConOut, 0, y_max - 1); -// refit_call2_wrapper(ST->ConOut->OutputString, ST->ConOut, message); refit_call2_wrapper(ST->ConOut->OutputString, ST->ConOut, L"Use cursor keys to edit, Esc to exit, Enter to boot with edited options"); diff --git a/refind/screen.c b/refind/screen.c index 97a4946..ae90f20 100644 --- a/refind/screen.c +++ b/refind/screen.c @@ -622,10 +622,8 @@ BOOLEAN line_edit(CHAR16 *line_in, CHAR16 **line_out, UINTN x_max, UINTN y_pos) switch (key.UnicodeChar) { case CHAR_LINEFEED: case CHAR_CARRIAGE_RETURN: - if (StrCmp(line, line_in) != 0) { - *line_out = line; - line = NULL; - } + *line_out = line; + line = NULL; enter = TRUE; exit = TRUE; break;