#! /bin/sh /usr/share/dpatch/dpatch-run ## 40_disable_EFI110_features.dpatch by ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Disable features that require EFI110, which gnu-efi doesn't support. @DPATCH@ diff -urNad refit-0.13~/refit/main.c refit-0.13/refit/main.c --- refit-0.13~/refit/main.c 2009-03-27 22:15:12.858281766 +0100 +++ refit-0.13/refit/main.c 2009-03-27 22:15:13.167307923 +0100 @@ -61,14 +61,18 @@ #define TAG_ABOUT (1) #define TAG_RESET (2) +#ifdef DEBIAN_ENABLE_EFI110 #define TAG_SHUTDOWN (3) +#endif /* DEBIAN_ENABLE_EFI110 */ #define TAG_TOOL (4) #define TAG_LOADER (5) #define TAG_LEGACY (6) static REFIT_MENU_ENTRY MenuEntryAbout = { L"About rEFIt", TAG_ABOUT, 1, 0, 'A', NULL, NULL, NULL }; static REFIT_MENU_ENTRY MenuEntryReset = { L"Restart Computer", TAG_RESET, 1, 0, 'R', NULL, NULL, NULL }; +#ifdef DEBIAN_ENABLE_EFI110 static REFIT_MENU_ENTRY MenuEntryShutdown = { L"Shut Down Computer", TAG_SHUTDOWN, 1, 0, 'U', NULL, NULL, NULL }; +#endif /* DEBIAN_ENABLE_EFI110 */ static REFIT_MENU_ENTRY MenuEntryReturn = { L"Return to Main Menu", TAG_RETURN, 0, 0, 0, NULL, NULL, NULL }; static REFIT_MENU_SCREEN MainMenu = { L"Main Menu", NULL, 0, NULL, 0, NULL, 0, L"Automatic boot" }; @@ -884,6 +888,8 @@ } } + +#ifdef DEBIAN_ENABLE_EFI110 // // pre-boot driver functions // @@ -995,6 +1001,7 @@ // connect all devices ConnectAllDriversToAllControllers(); } +#endif /* DEBIAN_ENABLE_EFI110 */ // // main entry point @@ -1031,7 +1038,9 @@ // further bootstrap (now with config available) SetupScreen(); +#ifdef DEBIAN_ENABLE_EFI110 LoadDrivers(); +#endif /* DEBIAN_ENABLE_EFI110 */ ScanVolumes(); DebugPause(); @@ -1050,8 +1059,10 @@ AddMenuEntry(&MainMenu, &MenuEntryAbout); } if (!(GlobalConfig.HideUIFlags & HIDEUI_FLAG_FUNCS) || MainMenu.EntryCount == 0) { +#ifdef DEBIAN_ENABLE_EFI110 MenuEntryShutdown.Image = BuiltinIcon(BUILTIN_ICON_FUNC_SHUTDOWN); AddMenuEntry(&MainMenu, &MenuEntryShutdown); +#endif /* DEBIAN_ENABLE_EFI110 */ MenuEntryReset.Image = BuiltinIcon(BUILTIN_ICON_FUNC_RESET); AddMenuEntry(&MainMenu, &MenuEntryReset); } @@ -1078,11 +1089,13 @@ MainLoopRunning = FALSE; // just in case we get this far break; +#ifdef DEBIAN_ENABLE_EFI110 case TAG_SHUTDOWN: // Shut Down TerminateScreen(); RT->ResetSystem(EfiResetShutdown, EFI_SUCCESS, 0, NULL); MainLoopRunning = FALSE; // just in case we get this far break; +#endif /* DEBIAN_ENABLE_EFI110 */ case TAG_ABOUT: // About rEFIt AboutRefit();