mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2025-02-08 23:51:39 +01:00
LinuxScan should scan not only the directory where Clover is
This commit is contained in:
parent
0dca81990b
commit
ca199712c4
@ -1248,7 +1248,7 @@ VOID ScanLoader(VOID)
|
|||||||
//----- Test common linux name and path like /EFI/ubuntu/grubx64.efi
|
//----- Test common linux name and path like /EFI/ubuntu/grubx64.efi
|
||||||
REFIT_DIR_ITER DirIter;
|
REFIT_DIR_ITER DirIter;
|
||||||
EFI_FILE_INFO *DirEntry = NULL;
|
EFI_FILE_INFO *DirEntry = NULL;
|
||||||
DirIterOpen(SelfRootDir, L"\\EFI", &DirIter);
|
DirIterOpen(Volume->RootDir, L"\\EFI", &DirIter);
|
||||||
while (DirIterNext(&DirIter, 1, L"*", &DirEntry)) {
|
while (DirIterNext(&DirIter, 1, L"*", &DirEntry)) {
|
||||||
if (DirEntry->FileName[0] == '.') {
|
if (DirEntry->FileName[0] == '.') {
|
||||||
//DBG("Skip dot entries: %ls\n", DirEntry->FileName);
|
//DBG("Skip dot entries: %ls\n", DirEntry->FileName);
|
||||||
@ -1256,7 +1256,7 @@ VOID ScanLoader(VOID)
|
|||||||
}
|
}
|
||||||
XString OSName = SPrintf("%ls", DirEntry->FileName); //this is folder name "ubuntu"
|
XString OSName = SPrintf("%ls", DirEntry->FileName); //this is folder name "ubuntu"
|
||||||
XStringW File = SWPrintf("EFI\\%ls\\grubx64.efi", DirEntry->FileName);
|
XStringW File = SWPrintf("EFI\\%ls\\grubx64.efi", DirEntry->FileName);
|
||||||
if (FileExists(SelfRootDir, File.wc_str())) {
|
if (FileExists(Volume->RootDir, File.wc_str())) {
|
||||||
XStringW LoaderTitle = SWPrintf("%s OS EFI boot menu", OSName.c_str());
|
XStringW LoaderTitle = SWPrintf("%s OS EFI boot menu", OSName.c_str());
|
||||||
XString IconXS = OSName + ",linux"_XS;
|
XString IconXS = OSName + ",linux"_XS;
|
||||||
IconXS.lowerAscii(); //to avoid misconception
|
IconXS.lowerAscii(); //to avoid misconception
|
||||||
|
Loading…
Reference in New Issue
Block a user