Fix XTLDR configuration
All checks were successful
Builds / ExectOS (amd64) (push) Successful in 28s
Builds / ExectOS (i686) (push) Successful in 29s

This commit is contained in:
2023-12-22 23:36:09 +01:00
parent 32042ef643
commit 113a46ef10
4 changed files with 21 additions and 24 deletions

View File

@@ -30,26 +30,22 @@ BlGetConfigValue(IN CONST PWCHAR ConfigName)
/* Get config entry name length */
Length = RtlWideStringLength(ConfigName, 0);
/* Make sure config list is not empty */
if(BlpConfig != NULL)
/* Iterate through config entries */
ConfigListEntry = BlpConfig.Flink;
while(ConfigListEntry != &BlpConfig)
{
/* Iterate through config entries */
ConfigListEntry = BlpConfig->Flink;
while(ConfigListEntry != BlpConfig)
/* Get config entry */
ConfigEntry = CONTAIN_RECORD(ConfigListEntry, XTBL_CONFIG_ENTRY, Flink);
/* Check if requested configuration found */
if(RtlCompareWideStringInsensitive(ConfigEntry->Name, ConfigName, Length) == 0)
{
/* Get config entry */
ConfigEntry = CONTAIN_RECORD(ConfigListEntry, XTBL_CONFIG_ENTRY, Flink);
/* Check if requested configuration found */
if(RtlCompareWideStringInsensitive(ConfigEntry->Name, ConfigName, Length) == 0)
{
/* Return config value */
return ConfigEntry->Value;
}
/* Move to the next config entry */
ConfigListEntry = ConfigListEntry->Flink;
/* Return config value */
return ConfigEntry->Value;
}
/* Move to the next config entry */
ConfigListEntry = ConfigListEntry->Flink;
}
/* Config entry not found, return NULL */
@@ -82,8 +78,8 @@ BlSetConfigValue(IN CONST PWCHAR ConfigName,
Length = RtlWideStringLength(ConfigName, 0);
/* Iterate through config entries */
ConfigListEntry = BlpConfig->Flink;
while(ConfigListEntry != BlpConfig)
ConfigListEntry = BlpConfig.Flink;
while(ConfigListEntry != &BlpConfig)
{
/* Get config entry */
ConfigEntry = CONTAIN_RECORD(ConfigListEntry, XTBL_CONFIG_ENTRY, Flink);
@@ -564,8 +560,9 @@ BlpUpdateConfiguration(IN PLIST_ENTRY NewConfig)
/* Make sure config entry does not exist yet */
if(BlGetConfigValue(ConfigEntry->Name) == NULL)
{
/* Put new config entry into global config list */
RtlInsertTailList(BlpConfig, &ConfigEntry->Flink);
/* Remove new config entry from input list and put it into global config list */
RtlRemoveEntryList(&ConfigEntry->Flink);
RtlInsertTailList(&BlpConfig, &ConfigEntry->Flink);
}
/* Move to the next new config entry */