From 4cbcc9d19f8bfa11a4bc396645c5689d4c6f9482 Mon Sep 17 00:00:00 2001 From: srs5694 Date: Mon, 31 Aug 2015 21:29:33 -0400 Subject: [PATCH] Update to Discoverable Partitions Specification support to work better if /etc/fstab lacks an entry for "/". --- NEWS.txt | 10 ++++++++++ refind/config.c | 13 +++++++++---- refind/main.c | 2 +- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/NEWS.txt b/NEWS.txt index 97c363a..7ffda3f 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -1,6 +1,16 @@ 0.9.1 (?/??/2015): ------------------ +- Improved Freedesktop.org Discoverable Partitions Specification support: + Previously, if no refind_linux.conf file was present but an /etc/fstab + file was found, rEFInd ignored the Discoverable Partitions Specification + filesystem-type codes. This was fine if /etc/fstab contained a valid "/" + filesystem specification, but if that was absent, the result was no + "root=" specification being present. Under these circumstances + (refind_linux.conf absent, /etc/fstab present but lacking a "/" entry), + rEFInd now tries to identify a device to specify as "root=" via the + Discoverable Partitions Specification. + - Fixed bug that caused "Found match!" and a prompt to press a key to continue to be printed if any partition used the Freedesktop.org Discoverable Partitions Specification root-partition GUID. (This diff --git a/refind/config.c b/refind/config.c index 6343f12..6227c67 100644 --- a/refind/config.c +++ b/refind/config.c @@ -1007,10 +1007,15 @@ static REFIT_FILE * GenerateOptionsFromEtcFstab(REFIT_VOLUME *Volume) { FreeTokenLine(&TokenList, &TokenCount); } // while - Options->Current8Ptr = (CHAR8 *)Options->Buffer; - Options->End8Ptr = Options->Current8Ptr + Options->BufferSize; - Options->Current16Ptr = (CHAR16 *)Options->Buffer; - Options->End16Ptr = Options->Current16Ptr + (Options->BufferSize >> 1); + if (Options->Buffer) { + Options->Current8Ptr = (CHAR8 *)Options->Buffer; + Options->End8Ptr = Options->Current8Ptr + Options->BufferSize; + Options->Current16Ptr = (CHAR16 *)Options->Buffer; + Options->End16Ptr = Options->Current16Ptr + (Options->BufferSize >> 1); + } else { + MyFreePool(Options); + Options = NULL; + } MyFreePool(Fstab->Buffer); MyFreePool(Fstab); diff --git a/refind/main.c b/refind/main.c index 6112b24..7c998cf 100644 --- a/refind/main.c +++ b/refind/main.c @@ -173,7 +173,7 @@ static VOID AboutrEFInd(VOID) if (AboutMenu.EntryCount == 0) { AboutMenu.TitleImage = BuiltinIcon(BUILTIN_ICON_FUNC_ABOUT); - AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.9.0.3"); + AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.9.0.4"); AddMenuInfoLine(&AboutMenu, L""); AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2006-2010 Christoph Pfisterer"); AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2012-2015 Roderick W. Smith"); -- 2.39.2