]> code.delx.au - refind/commitdiff
New "safe mode" boot option for OS X and "safemode" option for
authorsrs5694 <srs5694@users.sourceforge.net>
Thu, 10 Jan 2013 07:06:11 +0000 (02:06 -0500)
committersrs5694 <srs5694@users.sourceforge.net>
Thu, 10 Jan 2013 07:06:11 +0000 (02:06 -0500)
"hideui" refind.conf token to disable it.

NEWS.txt
docs/refind/configfile.html
refind/config.c
refind/config.h
refind/main.c

index 435740070a4cbe51c0ac938a3ae9f1e27334fe76..d14ebed0fcc9c7498a1599dca9333b7efed36f78 100644 (file)
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -1,6 +1,11 @@
 0.6.5 (1/??/2013):
 ------------------
 
+- Added "safemode" option to "hideui" token, to hide option to boot into
+  safe mode for OS X ("-v -x" option to boot.efi).
+
+- Added icon for Haiku (os_haiku.icns).
+
 - Fixed bug that could cause rEFInd to crash if fed a banner image that's
   too big. Note that "too big" can be substantially smaller than the screen
   resolution!
index b45b12957c3860a44bbe2041da893592f284d5b5..ae5bc7c8dc309718523dad1db96ae22d657dd240 100644 (file)
@@ -175,8 +175,8 @@ timeout 20
 </tr>
 <tr>
    <td><tt>hideui</tt></td>
-   <td><tt>banner</tt>, <tt>label</tt>, <tt>singleuser</tt>, <tt>hwtest</tt>, <tt>arrows</tt>, <tt>hints</tt>, <tt>editor</tt>, or <tt>all</tt></td>
-   <td>Removes the specified user interface features. <tt>banner</tt> removes the banner graphic, <tt>label</tt> removes the text description of each tag and the countdown timer, <tt>singleuser</tt> removes the single-user option from the Mac OS sub-menu, <tt>hwtest</tt> removes the Mac OS hardware test option, <tt>arrows</tt> removes the arrows to the right or left of the OS tags when rEFInd finds too many OSes to display simultaneously, <tt>hints</tt> removes the brief description of what basic keypressed do, <tt>editor</tt> disables the options editor, and <tt>all</tt> removes all of these options. You can specify multiple parameters with this option. The default is to set none of these values.</td>
+   <td><tt>banner</tt>, <tt>label</tt>, <tt>singleuser</tt>, <tt>safemode</tt>, <tt>hwtest</tt>, <tt>arrows</tt>, <tt>hints</tt>, <tt>editor</tt>, or <tt>all</tt></td>
+   <td>Removes the specified user interface features. <tt>banner</tt> removes the banner graphic, <tt>label</tt> removes the text description of each tag and the countdown timer, <tt>singleuser</tt> removes the single-user option from the OS X sub-menu, <tt>safemode</tt> removes the option to boot to safe mode from the OS X sub-menu, <tt>hwtest</tt> removes the Macintosh hardware test option, <tt>arrows</tt> removes the arrows to the right or left of the OS tags when rEFInd finds too many OSes to display simultaneously, <tt>hints</tt> removes the brief description of what basic keypresses do, <tt>editor</tt> disables the options editor, and <tt>all</tt> removes all of these options. You can specify multiple parameters with this option. The default is to set none of these values.</td>
 </tr>
 <tr>
    <td><tt>icons_dir</tt></td>
index 12375c4868e04382d7009e5e4aac02b37a79df22..8c18f41e45e79c6cd1f9b006d7531f7ff4ac9e76 100644 (file)
@@ -398,6 +398,8 @@ VOID ReadConfig(CHAR16 *FileName)
                    GlobalConfig.HideUIFlags |= HIDEUI_FLAG_HINTS;
                 } else if (StriCmp(FlagName, L"editor") == 0) {
                    GlobalConfig.HideUIFlags |= HIDEUI_FLAG_EDITOR;
+                } else if (StriCmp(FlagName, L"safemode") == 0) {
+                   GlobalConfig.HideUIFlags |= HIDEUI_FLAG_SAFEMODE;
                 } else if (StriCmp(FlagName, L"all") == 0) {
                    GlobalConfig.HideUIFlags = HIDEUI_FLAG_ALL;
                 } else {
index bc211a98ac74605803cf9de9ce07135457e9dd82..cafcb4f95ccd3643e451ae1f5c0ec02b8e95f351 100644 (file)
@@ -75,6 +75,7 @@ typedef struct {
 #define HIDEUI_FLAG_ARROWS     (0x0010)
 #define HIDEUI_FLAG_HINTS      (0x0020)
 #define HIDEUI_FLAG_EDITOR     (0x0040)
+#define HIDEUI_FLAG_SAFEMODE   (0x0080)
 #define HIDEUI_FLAG_ALL       ((0xffff))
 
 #define CONFIG_FILE_NAME         L"refind.conf"
index 5f5a64d41ec32919f16829de92e0e150810a430d..4006ac7dfde453783eea5105ae147618914fa64b 100644 (file)
@@ -568,7 +568,17 @@ VOID GenerateSubScreen(LOADER_ENTRY *Entry, IN REFIT_VOLUME *Volume) {
             SubEntry->LoadOptions     = L"-v -s";
             AddMenuEntry(SubScreen, (REFIT_MENU_ENTRY *)SubEntry);
          } // if
-      } // not single-user
+      } // single-user mode allowed
+
+      if (!(GlobalConfig.HideUIFlags & HIDEUI_FLAG_SAFEMODE)) {
+         SubEntry = InitializeLoaderEntry(Entry);
+         if (SubEntry != NULL) {
+            SubEntry->me.Title        = L"Boot Mac OS X in safe mode";
+            SubEntry->UseGraphicsMode = FALSE;
+            SubEntry->LoadOptions     = L"-v -x";
+            AddMenuEntry(SubScreen, (REFIT_MENU_ENTRY *)SubEntry);
+         } // if
+      } // safe mode allowed
 
       // check for Apple hardware diagnostics
       StrCpy(DiagsFileName, L"System\\Library\\CoreServices\\.diagnostics\\diags.efi");