-
- OptionsFilename = FindPath(LoaderPath);
- MergeStrings(&OptionsFilename, LINUX_OPTIONS_FILENAME, L'\\');
- if (FileExists(Volume->RootDir, OptionsFilename)) {
- File = AllocateZeroPool(sizeof(REFIT_FILE));
- Status = ReadFile(Volume->RootDir, OptionsFilename, File);
- if (CheckError(Status, L"while loading the Linux options file"))
- File = NULL;
- }
- if (OptionsFilename != NULL)
- FreePool(OptionsFilename);
+
+ do {
+ OptionsFilename = FindCommaDelimited(LINUX_OPTIONS_FILENAMES, i++);
+ FullFilename = FindPath(LoaderPath);
+ if ((OptionsFilename != NULL) && (FullFilename != NULL)) {
+ MergeStrings(&FullFilename, OptionsFilename, '\\');
+ if (FileExists(Volume->RootDir, FullFilename)) {
+ File = AllocateZeroPool(sizeof(REFIT_FILE));
+ Status = ReadFile(Volume->RootDir, FullFilename, File);
+ GoOn = FALSE;
+ if (CheckError(Status, L"while loading the Linux options file"))
+ File = NULL;
+ } // if
+ } else {
+ GoOn = FALSE;
+ } // if/else
+ if (OptionsFilename != NULL)
+ FreePool(OptionsFilename);
+ if (FullFilename != NULL)
+ FreePool(FullFilename);
+ OptionsFilename = FullFilename = NULL;
+ } while (GoOn);