]> code.delx.au - refind/commitdiff
Fixed compilation bug for 32-bit systems that caused filesystem name issues.
authorsrs5694 <srs5694@users.sourceforge.net>
Sat, 23 Jun 2012 03:56:45 +0000 (23:56 -0400)
committersrs5694 <srs5694@users.sourceforge.net>
Sat, 23 Jun 2012 03:56:45 +0000 (23:56 -0400)
Make.tiano
NEWS.txt
filesystems/Make.tiano
install.sh
refind/lib.c
refind/main.c

index 5eb99fcb18a942961dc9f4751eccc01f0cb79466..4b4ee920585f5777a1b8e2fcf64748ceec504e0c 100644 (file)
@@ -14,7 +14,7 @@ ifeq ($(ARCH),ia64)
 endif
 
 ifeq ($(ARCH),ia32)
-  ARCH_C_FLAGS = -m32 -DEFI32
+  ARCH_C_FLAGS = -m32 -DEFI32 -malign-double
   ARCHDIR = Ia32
   FILENAME_CODE = ia32
 endif
index 6b87aea52eedcc6ea57b9e0f1ad952b6a6233d87..30b57fe0048e1d13192cca2e6a9cdcc3c1dadf08 100644 (file)
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -1,3 +1,18 @@
+0.4.4 (6/??/2012):
+------------------
+
+- Fixed bug that caused filesystem labels to be corrupted by rEFInd on
+  32-bit systems.
+
+- Fixed bug that caused filesystem labels to be truncated in the drivers
+  on 32-bit systems.
+
+- Fixed bug in use_graphics_for option parsing that caused most options
+  to set graphics mode for OS X and/or Linux but not other boot
+  loaders/OSes.
+
+- Tweaked install script to better isolate the ESP under OS X.
+
 0.4.3 (6/21/2012):
 ------------------
 
index 7a5de978c0cc5c8ee26f97db7991898d424f4a04..138afb838d8e1ed77bd3461a3e498fa7c9affa80 100644 (file)
@@ -14,7 +14,7 @@ ifeq ($(ARCH),ia64)
 endif
 
 ifeq ($(ARCH),ia32)
-  ARCH_C_FLAGS = -m32
+  ARCH_C_FLAGS = -m32 -malign-double
   ARCHDIR = Ia32
   FILENAME_CODE = ia32
 endif
@@ -25,7 +25,8 @@ ifeq ($(ARCH),x86_64)
   FILENAME_CODE = x64
 endif
 
-EDK2BASE = /usr/local/UDK2010/MyWorkSpace
+#EDK2BASE = /usr/local/UDK2010/MyWorkSpace
+EDK2BASE = /usr/local/edk2
 
 # Below file defines TARGET (RELEASE or DEBUG), TARGET_ARCH (X64 or IA32), and TOOL_CHAIN_TAG (GCC44, GCC45, or GCC46)
 include $(EDK2BASE)/Conf/target.txt
index 961c90c5462c44d39c39a37001a03f023029a3c7..9d612a85bebde9888442bbf88894a8caacae9bcb 100644 (file)
@@ -125,7 +125,7 @@ CopyRefindFiles() {
 MountOSXESP() {
    # Identify the ESP. Note: This returns the FIRST ESP found;
    # if the system has multiple disks, this could be wrong!
-   Temp=`diskutil list | grep EFI`
+   Temp=`diskutil list | grep " EFI "`
    Esp=/dev/`echo $Temp | cut -f 5 -d ' '`
    # If the ESP is mounted, use its current mount point....
    Temp=`df | grep $Esp`
index 85a1de2fbc6979494ec2aaec34234047826e59a1..455a3efaea5239100d534b52dcce713610358a16 100644 (file)
@@ -702,7 +702,6 @@ static VOID ScanExtendedPartition(REFIT_VOLUME *WholeDiskVolume, MBR_PARTITION_I
                 Volume->MbrPartitionIndex = LogicalPartitionIndex++;
                 Volume->VolName = AllocateZeroPool(256 * sizeof(UINT16));
                 SPrint(Volume->VolName, 255, L"Partition %d", Volume->MbrPartitionIndex + 1);
-//                Volume->VolName = PoolPrint(L"Partition %d", Volume->MbrPartitionIndex + 1);
                 Volume->BlockIO = WholeDiskVolume->BlockIO;
                 Volume->BlockIOOffset = ExtCurrent + EMbrTable[i].StartLBA;
                 Volume->WholeDiskBlockIO = WholeDiskVolume->BlockIO;
index 95586559b35d638dc0c2171eb413175796fd9b9b..6e79bc10623e7da29d2aa2b917056ae0109c80d4 100644 (file)
@@ -110,7 +110,7 @@ static VOID AboutrEFInd(VOID)
 
     if (AboutMenu.EntryCount == 0) {
         AboutMenu.TitleImage = BuiltinIcon(BUILTIN_ICON_FUNC_ABOUT);
-        AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.4.3.1");
+        AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.4.3.2");
         AddMenuInfoLine(&AboutMenu, L"");
         AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2006-2010 Christoph Pfisterer");
         AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2012 Roderick W. Smith");
@@ -118,7 +118,7 @@ static VOID AboutrEFInd(VOID)
         AddMenuInfoLine(&AboutMenu, L"Distributed under the terms of the GNU GPLv3 license");
         AddMenuInfoLine(&AboutMenu, L"");
         AddMenuInfoLine(&AboutMenu, L"Running on:");
-        TempStr = AllocateZeroPool(255 * sizeof(CHAR16));
+        TempStr = AllocateZeroPool(256 * sizeof(CHAR16));
         SPrint(TempStr, 255, L" EFI Revision %d.%02d", ST->Hdr.Revision >> 16, ST->Hdr.Revision & ((1 << 16) - 1));
         AddMenuInfoLine(&AboutMenu, TempStr);
 #if defined(EFI32)
@@ -128,11 +128,11 @@ static VOID AboutrEFInd(VOID)
 #else
         AddMenuInfoLine(&AboutMenu, L" Platform: unknown");
 #endif
-        TempStr = AllocateZeroPool(255 * sizeof(CHAR16));
+        TempStr = AllocateZeroPool(256 * sizeof(CHAR16));
         SPrint(TempStr, 255, L" Firmware: %s %d.%02d",
                ST->FirmwareVendor, ST->FirmwareRevision >> 16, ST->FirmwareRevision & ((1 << 16) - 1));
         AddMenuInfoLine(&AboutMenu, TempStr);
-        TempStr = AllocateZeroPool(255 * sizeof(CHAR16));
+        TempStr = AllocateZeroPool(256 * sizeof(CHAR16));
         SPrint(TempStr, 255, L" Screen Output: %s", egScreenDescription());
         AddMenuInfoLine(&AboutMenu, TempStr);
         AddMenuInfoLine(&AboutMenu, L"");
@@ -411,7 +411,7 @@ LOADER_ENTRY *InitializeLoaderEntry(IN LOADER_ENTRY *Entry) {
 // Returns a pointer to the new subscreen data structure, or NULL if there
 // were problems allocating memory.
 REFIT_MENU_SCREEN *InitializeSubScreen(IN LOADER_ENTRY *Entry) {
-   CHAR16              *FileName, *Temp = NULL, *TitleStr;
+   CHAR16              *FileName, *Temp = NULL;
    REFIT_MENU_SCREEN   *SubScreen = NULL;
    LOADER_ENTRY        *SubEntry;
 
@@ -419,9 +419,9 @@ REFIT_MENU_SCREEN *InitializeSubScreen(IN LOADER_ENTRY *Entry) {
    if (Entry->me.SubScreen == NULL) { // No subscreen yet; initialize default entry....
       SubScreen = AllocateZeroPool(sizeof(REFIT_MENU_SCREEN));
       if (SubScreen != NULL) {
-         TitleStr = AllocateZeroPool(sizeof(CHAR16) * 256);
-         SPrint(TitleStr, 255, L"Boot Options for %s on %s", (Entry->Title != NULL) ? Entry->Title : FileName, Entry->VolName);
-         SubScreen->Title = TitleStr;
+         SubScreen->Title = AllocateZeroPool(sizeof(CHAR16) * 256);
+         SPrint(SubScreen->Title, 255, L"Boot Options for %s on %s",
+                (Entry->Title != NULL) ? Entry->Title : FileName, Entry->VolName);
          SubScreen->TitleImage = Entry->me.Image;
          // default entry
          SubEntry = InitializeLoaderEntry(Entry);
@@ -734,15 +734,13 @@ VOID SetLoaderDefaults(LOADER_ENTRY *Entry, CHAR16 *LoaderPath, IN REFIT_VOLUME
 // for icons, options, etc.
 LOADER_ENTRY * AddLoaderEntry(IN CHAR16 *LoaderPath, IN CHAR16 *LoaderTitle, IN REFIT_VOLUME *Volume) {
    LOADER_ENTRY      *Entry;
-   CHAR16            *PoolStr;
 
    CleanUpPathNameSlashes(LoaderPath);
    Entry = InitializeLoaderEntry(NULL);
    if (Entry != NULL) {
       Entry->Title = StrDuplicate((LoaderTitle != NULL) ? LoaderTitle : LoaderPath);
-      PoolStr = AllocateZeroPool(sizeof(CHAR16) * 256);
-      SPrint(PoolStr, 255, L"Boot %s from %s", (LoaderTitle != NULL) ? LoaderTitle : LoaderPath, Volume->VolName);
-      Entry->me.Title = PoolStr;
+      Entry->me.Title = AllocateZeroPool(sizeof(CHAR16) * 256);
+      SPrint(Entry->me.Title, 255, L"Boot %s from %s", (LoaderTitle != NULL) ? LoaderTitle : LoaderPath, Volume->VolName);
       Entry->me.Row = 0;
       Entry->me.BadgeImage = Volume->VolBadgeImage;
       if ((LoaderPath != NULL) && (LoaderPath[0] != L'\\')) {
@@ -1162,7 +1160,6 @@ static LEGACY_ENTRY * AddLegacyEntry(IN CHAR16 *LoaderTitle, IN REFIT_VOLUME *Vo
     REFIT_MENU_SCREEN       *SubScreen;
     CHAR16                  *VolDesc;
     CHAR16                  ShortcutLetter = 0;
-    CHAR16                  *PoolStr;
 
     if (LoaderTitle == NULL) {
         if (Volume->OSName != NULL) {
@@ -1179,9 +1176,8 @@ static LEGACY_ENTRY * AddLegacyEntry(IN CHAR16 *LoaderTitle, IN REFIT_VOLUME *Vo
 
     // prepare the menu entry
     Entry = AllocateZeroPool(sizeof(LEGACY_ENTRY));
-    PoolStr = AllocateZeroPool(256 * sizeof(CHAR16));
-    SPrint(PoolStr, 255, L"Boot %s from %s", LoaderTitle, VolDesc);
-    Entry->me.Title        = PoolStr;
+    Entry->me.Title = AllocateZeroPool(256 * sizeof(CHAR16));
+    SPrint(Entry->me.Title, 255, L"Boot %s from %s", LoaderTitle, VolDesc);
     Entry->me.Tag          = TAG_LEGACY;
     Entry->me.Row          = 0;
     Entry->me.ShortcutLetter = ShortcutLetter;
@@ -1194,16 +1190,14 @@ static LEGACY_ENTRY * AddLegacyEntry(IN CHAR16 *LoaderTitle, IN REFIT_VOLUME *Vo
 
     // create the submenu
     SubScreen = AllocateZeroPool(sizeof(REFIT_MENU_SCREEN));
-    PoolStr = AllocateZeroPool(256 * sizeof(CHAR16));
-    SPrint(PoolStr, 255, L"Boot Options for %s on %s", LoaderTitle, VolDesc);
-    SubScreen->Title = PoolStr;
+    SubScreen->Title = AllocateZeroPool(256 * sizeof(CHAR16));
+    SPrint(SubScreen->Title, 255, L"Boot Options for %s on %s", LoaderTitle, VolDesc);
     SubScreen->TitleImage = Entry->me.Image;
 
     // default entry
     SubEntry = AllocateZeroPool(sizeof(LEGACY_ENTRY));
-    PoolStr = AllocateZeroPool(256 * sizeof(CHAR16));
-    SPrint(PoolStr, 255, L"Boot %s", LoaderTitle);
-    SubEntry->me.Title        = PoolStr;
+    SubEntry->me.Title = AllocateZeroPool(256 * sizeof(CHAR16));
+    SPrint(SubEntry->me.Title, 255, L"Boot %s", LoaderTitle);
     SubEntry->me.Tag          = TAG_LEGACY;
     SubEntry->Volume          = Entry->Volume;
     SubEntry->LoadOptions     = Entry->LoadOptions;