diff --git a/rEFIt_UEFI/entry_scan/loader.cpp b/rEFIt_UEFI/entry_scan/loader.cpp index f7507b851..a1ce790de 100644 --- a/rEFIt_UEFI/entry_scan/loader.cpp +++ b/rEFIt_UEFI/entry_scan/loader.cpp @@ -1756,6 +1756,7 @@ STATIC VOID AddCustomEntry(IN UINTN CustomIndex, if (FindCustomPath && Custom->Type == OSTYPE_LINEFI && OSFLAG_ISUNSET(Custom->Flags, OSFLAG_NODEFAULTARGS)) { // Find the init ram image and select root CustomOptions = LinuxKernelOptions(Iter->DirHandle, Basename(CustomPath.wc_str()) + LINUX_LOADER_PATH.length(), PartUUID, Custom->LoadOptions); + Custom->Flags = OSFLAG_SET(Custom->Flags, OSFLAG_NODEFAULTARGS); } // Check to make sure that this entry is not hidden or disabled by another custom entry diff --git a/rEFIt_UEFI/gui/REFIT_MENU_SCREEN.cpp b/rEFIt_UEFI/gui/REFIT_MENU_SCREEN.cpp index afc259324..aa7dffd52 100644 --- a/rEFIt_UEFI/gui/REFIT_MENU_SCREEN.cpp +++ b/rEFIt_UEFI/gui/REFIT_MENU_SCREEN.cpp @@ -2635,21 +2635,20 @@ UINTN REFIT_MENU_SCREEN::RunMainMenu(IN INTN DefaultSelection, OUT REFIT_ABSTRAC break; } - if (TempChosenEntry->getREFIT_MENU_ITEM_BOOTNUM()) { - DecodeOptions(TempChosenEntry->getREFIT_MENU_ITEM_BOOTNUM()); -// DBG("get OptionsBits = 0x%X\n", gSettings.OptionsBits); -// DBG(" TempChosenEntry FlagsBits = 0x%X\n", ((LOADER_ENTRY*)TempChosenEntry)->Flags); - } - if (MainChosenEntry->getREFIT_MENU_ENTRY_CLOVER()) { MainChosenEntry->getREFIT_MENU_ENTRY_CLOVER()->LoadOptions = (((REFIT_MENU_ENTRY_CLOVER*)TempChosenEntry)->LoadOptions); } // DBG(" exit menu with LoadOptions: %ls\n", ((LOADER_ENTRY*)MainChosenEntry)->LoadOptions); if (SubMenuExit == MENU_EXIT_ENTER && MainChosenEntry->getLOADER_ENTRY() && TempChosenEntry->getLOADER_ENTRY()) { - // Only for non-legacy entries, as LEGACY_ENTRY doesn't have Flags + // Only for non-legacy entries, as LEGACY_ENTRY doesn't have Flags/Options MainChosenEntry->getLOADER_ENTRY()->Flags = TempChosenEntry->getLOADER_ENTRY()->Flags; // DBG(" get MainChosenEntry FlagsBits = 0x%X\n", ((LOADER_ENTRY*)MainChosenEntry)->Flags); + if (OSFLAG_ISUNSET(TempChosenEntry->getLOADER_ENTRY()->Flags, OSFLAG_NODEFAULTARGS)) { + DecodeOptions(TempChosenEntry->getLOADER_ENTRY()); +// DBG("get OptionsBits = 0x%X\n", gSettings.OptionsBits); +// DBG(" TempChosenEntry FlagsBits = 0x%X\n", ((LOADER_ENTRY*)TempChosenEntry)->Flags); + } // copy also loadoptions from subentry to mainentry MainChosenEntry->getLOADER_ENTRY()->LoadOptions = TempChosenEntry->getLOADER_ENTRY()->LoadOptions; }