Some additions to previous commit

This commit is contained in:
asava 2020-05-10 23:31:35 +03:00
parent 1dbc79eb1b
commit cfaf51cee4
2 changed files with 7 additions and 7 deletions

View File

@ -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

View File

@ -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;
}