Remove "ZeroMem(&gSettings.BootArgs, 256);" because BootArgs is now an

XString.
This commit is contained in:
jief666 2020-08-31 15:24:00 +03:00
parent 1963d37ef1
commit 8449a39e4f
3 changed files with 14 additions and 23 deletions

View File

@ -2654,7 +2654,7 @@ UINTN REFIT_MENU_SCREEN::RunMainMenu(IN INTN DefaultSelection, OUT REFIT_ABSTRAC
if (TempChosenEntry->getLOADER_ENTRY()->LoadOptions.notEmpty()) {
gSettings.BootArgs = TempChosenEntry->getLOADER_ENTRY()->LoadOptions.ConcatAll(" "_XS8);
} else {
ZeroMem(&gSettings.BootArgs, 255);
gSettings.BootArgs.setEmpty();
}
DBG(" boot with args: %s\n", gSettings.BootArgs.c_str());
}

View File

@ -1136,17 +1136,17 @@ static VOID ScanDriverDir(IN CONST CHAR16 *Path, OUT EFI_HANDLE **DriversToConne
}
{
size_t i;
// either AptioMem, AptioFix* or LowMemFix exclusively
for (i = 0; i != ARRAY_SIZE(AptioNames); ++i)
if (StrStr(DirEntry->FileName, AptioNames[i]) != NULL)
break;
if (i != ARRAY_SIZE(AptioNames)) {
if (((UINT8) i) != AptioBlessed)
continue;
if (AptioBlessed < (UINT8) ARRAY_SIZE(AptioIndices))
BOOLEAN_AT_INDEX(AptioBlessed) = TRUE;
AptioBlessed = (UINT8) ARRAY_SIZE(AptioNames);
}
// either AptioMem, AptioFix* or LowMemFix exclusively
for (i = 0; i != ARRAY_SIZE(AptioNames); ++i)
if (StrStr(DirEntry->FileName, AptioNames[i]) != NULL)
break;
if (i != ARRAY_SIZE(AptioNames)) {
if (((UINT8) i) != AptioBlessed)
continue;
if (AptioBlessed < (UINT8) ARRAY_SIZE(AptioIndices))
BOOLEAN_AT_INDEX(AptioBlessed) = TRUE;
AptioBlessed = (UINT8) ARRAY_SIZE(AptioNames);
}
}
#undef BOOLEAN_AT_INDEX

View File

@ -471,22 +471,13 @@ VOID ApplyInputs(VOID)
BOOLEAN NeedSave = TRUE;
INTN i = 0;
UINTN j;
// UINT32 k;
CHAR16 *ch;
CHAR8 AString[256];
// DBG("ApplyInputs\n");
if (InputItems[i].Valid) {
ZeroMem(&gSettings.BootArgs, 256);
gBootChanged = TRUE;
ch = InputItems[i].SValue.data(0);
do {
if (*ch == L'\\') {
*ch = L'_';
}
} while (*(++ch));
gSettings.BootArgs = InputItems[i].SValue;
gSettings.BootArgs.replaceAll('\\', '_');
gBootChanged = TRUE;
}
i++; //1
if (InputItems[i].Valid) {