UINTN ReadTokenLine(IN REFIT_FILE *File, OUT CHAR16 ***TokenList)
{
BOOLEAN LineFinished, IsQuoted = FALSE;
- CHAR16 *Line, *Token, *p;
+ CHAR16 *Line, *Token, *p, *Temp;
UINTN TokenCount = 0;
*TokenList = NULL;
while (*p && *p != '"' && ((*p != ' ' && *p != '\t' && *p != '=' && *p != '#' && *p != ',') || IsQuoted)) {
if ((*p == '/') && !IsQuoted) // Switch Unix-style to DOS-style directory separators
*p = '\\';
+ if (*p == '|') {
+ Temp = StrDuplicate(&p[1]);
+ StrCpy(p, Temp);
+ }
p++;
} // if
if (*p == '"')
if (EFI_ERROR(Status))
return;
- GlobalConfig.DontScan = StrDuplicate(SelfDirPath);
+ MyFreePool(GlobalConfig.DontScanDirs);
+ GlobalConfig.DontScanDirs = StrDuplicate(SelfDirPath);
+ MyFreePool(GlobalConfig.DontScanFiles);
+ GlobalConfig.DontScanFiles = StrDuplicate(DONT_SCAN_FILES);
for (;;) {
TokenCount = ReadTokenLine(&File, &TokenList);
HandleStrings(TokenList, TokenCount, &(GlobalConfig.AlsoScan));
} else if ((StriCmp(TokenList[0], L"don't_scan_dirs") == 0) || (StriCmp(TokenList[0], L"dont_scan_dirs") == 0)) {
- HandleStrings(TokenList, TokenCount, &(GlobalConfig.DontScan));
+ HandleStrings(TokenList, TokenCount, &(GlobalConfig.DontScanDirs));
+
+ } else if ((StriCmp(TokenList[0], L"don't_scan_files") == 0) || (StriCmp(TokenList[0], L"dont_scan_files") == 0)) {
+ HandleStrings(TokenList, TokenCount, &(GlobalConfig.DontScanFiles));
} else if (StriCmp(TokenList[0], L"scan_driver_dirs") == 0) {
HandleStrings(TokenList, TokenCount, &(GlobalConfig.DriverDirs));
return(Entry);
} // static VOID AddStanzaEntries()
-// Read the user-configured loaders file, refind_loaders.conf, and add or delete
+// Read the user-configured menu entries from refind.conf and add or delete
// entries based on the contents of that file....
VOID ScanUserConfigured(VOID)
{
CHAR16 *Title = NULL;
UINTN TokenCount, size;
LOADER_ENTRY *Entry;
+// REFIT_MENU_SCREEN *SubScreen;
if (FileExists(SelfDir, CONFIG_FILE_NAME)) {
Status = ReadFile(SelfDir, CONFIG_FILE_NAME, &File, &size);