-static VOID ScanTool(VOID)
-{
- CHAR16 FileName[256];
- LOADER_ENTRY *Entry;
-
- if (GlobalConfig.DisableFlags & DISABLE_FLAG_TOOLS)
- return;
-
- // look for the EFI shell
- if (!(GlobalConfig.DisableFlags & DISABLE_FLAG_SHELL)) {
- SPrint(FileName, 255, L"%s\\apps\\shell.efi", SelfDirPath);
- if (FileExists(SelfRootDir, FileName)) {
- AddToolEntry(FileName, L"EFI Shell", BuiltinIcon(BUILTIN_ICON_TOOL_SHELL), 'E', FALSE);
- } else {
- StrCpy(FileName, L"\\efi\\tools\\shell.efi");
- if (FileExists(SelfRootDir, FileName)) {
- AddToolEntry(FileName, L"EFI Shell", BuiltinIcon(BUILTIN_ICON_TOOL_SHELL), 'E', FALSE);
- }
- }
- }
-
- // look for the GPT/MBR sync tool
- StrCpy(FileName, L"\\efi\\tools\\gptsync.efi");
- if (FileExists(SelfRootDir, FileName)) {
- AddToolEntry(FileName, L"Make Hybrid MBR", BuiltinIcon(BUILTIN_ICON_TOOL_PART), 'P', FALSE);
- }
-
- // look for rescue Linux
- StrCpy(FileName, L"\\efi\\rescue\\elilo.efi");
- if (SelfVolume != NULL && FileExists(SelfRootDir, FileName)) {
- Entry = AddToolEntry(FileName, L"Rescue Linux", BuiltinIcon(BUILTIN_ICON_TOOL_RESCUE), '0', FALSE);
-
- if (UGAWidth == 1440 && UGAHeight == 900)
- Entry->LoadOptions = L"-d 0 i17";
- else if (UGAWidth == 1680 && UGAHeight == 1050)
- Entry->LoadOptions = L"-d 0 i20";
- else
- Entry->LoadOptions = L"-d 0 mini";
- }
-}
-
-