]> code.delx.au - refind/commitdiff
Update to Discoverable Partitions Specification support to work better
authorsrs5694 <srs5694@users.sourceforge.net>
Tue, 1 Sep 2015 01:29:33 +0000 (21:29 -0400)
committersrs5694 <srs5694@users.sourceforge.net>
Tue, 1 Sep 2015 01:29:33 +0000 (21:29 -0400)
if /etc/fstab lacks an entry for "/".

NEWS.txt
refind/config.c
refind/main.c

index 97c363aadee0ac8332e00bc1806a85d3b9280b12..7ffda3fa3d6c0f9bd96280ec15498275faa007b0 100644 (file)
--- 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
index 6343f12a8547f09e5a8bf08ae8a082a247bc3ba3..6227c67919ded63040851182de82bb68e7a1b49b 100644 (file)
@@ -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);
index 6112b243a71ab1518aca96efd483d3057db0c030..7c998cf76f0fc8d09c33d37325624466bd59b321 100644 (file)
@@ -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");