mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-25 11:55:28 +01:00
Remove Self::getCloverDirAndEfiFileName.
This commit is contained in:
parent
17c8480280
commit
2d2b942ef4
@ -5,7 +5,7 @@
|
||||
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="26118944103653619" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-372861491753091324" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||
</provider>
|
||||
@ -16,7 +16,7 @@
|
||||
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="99479219182169715" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-353801442845504348" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||
</provider>
|
||||
|
@ -141,20 +141,19 @@ static UINTN GetDebugLogFile()
|
||||
const EFI_FILE_PROTOCOL& CloverDir = self.getCloverDir();
|
||||
const XString& efiFileName = self.getCloverEfiFileName();
|
||||
#else
|
||||
XStringW efiFileName;
|
||||
const EFI_FILE_PROTOCOL* CloverDirPtr = Self::getCloverDirAndEfiFileName(gImageHandle, &efiFileName);
|
||||
const EFI_FILE_PROTOCOL* CloverDirPtr = &self.getCloverDirOrNull();
|
||||
if ( CloverDirPtr == NULL ) return 0;
|
||||
const EFI_FILE_PROTOCOL& CloverDir = *CloverDirPtr;
|
||||
#endif
|
||||
|
||||
if ( debugLogFileName.isEmpty() )
|
||||
{
|
||||
debugLogFileName = S8Printf("misc\\%04d-%02d-%02d_%02d-%02d_%ls.log", Now.Year, Now.Month, Now.Day, Now.Hour, Now.Minute, efiFileName.wc_str());
|
||||
debugLogFileName = S8Printf("misc\\%04d-%02d-%02d_%02d-%02d_%ls.log", Now.Year, Now.Month, Now.Day, Now.Hour, Now.Minute, self.getCloverEfiFileNameOrNull().wc_str());
|
||||
Status = CloverDir.Open(&CloverDir, &LogFile, debugLogFileName.wc_str(), EFI_FILE_MODE_READ, 0);
|
||||
if ( !EFI_ERROR(Status) ) LogFile->Close(LogFile); // DO NOT modify Status here.
|
||||
INTN i=1;
|
||||
while ( Status != EFI_NOT_FOUND && (i < MAX_INTN) ) {
|
||||
debugLogFileName = S8Printf("misc\\%04d-%02d-%02d_%02d-%02d_%ls(%lld).log", Now.Year, Now.Month, Now.Day, Now.Hour, Now.Minute, efiFileName.wc_str(), i);
|
||||
debugLogFileName = S8Printf("misc\\%04d-%02d-%02d_%02d-%02d_%ls(%lld).log", Now.Year, Now.Month, Now.Day, Now.Hour, Now.Minute, self.getCloverEfiFileNameOrNull().wc_str(), i);
|
||||
Status = CloverDir.Open(&CloverDir, &LogFile, debugLogFileName.wc_str(), EFI_FILE_MODE_READ, 0);
|
||||
if ( !EFI_ERROR(Status) ) LogFile->Close(LogFile); // DO NOT modify Status here.
|
||||
}
|
||||
|
@ -109,23 +109,6 @@ EFI_STATUS Self::__initialize(XBool debugMsg, EFI_HANDLE SelfImageHandle, EFI_LO
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
const EFI_FILE_PROTOCOL* Self::getCloverDirAndEfiFileName(EFI_HANDLE ImageHandle, XStringW* efiFileName)
|
||||
{
|
||||
EFI_LOADED_IMAGE* SelfLoadedImage; // this efi.
|
||||
EFI_SIMPLE_FILE_SYSTEM_PROTOCOL* SelfSimpleVolume; // Volume containing this efi.
|
||||
EFI_FILE* SelfVolumeRootDir; // Root dir of the volume containing this efi.
|
||||
XStringW CloverDirFullPath; // full path of folder containing this efi.
|
||||
EFI_FILE* CloverDir; // opened folder containing this efi
|
||||
|
||||
/*EFI_STATUS Status = */__initialize(false, ImageHandle, &SelfLoadedImage, &SelfSimpleVolume, &SelfVolumeRootDir, &CloverDirFullPath, efiFileName, &CloverDir);
|
||||
if ( efiFileName->isEmpty() ) {
|
||||
if ( CloverDir != NULL ) CloverDir->Close(CloverDir);
|
||||
return NULL;
|
||||
}
|
||||
return CloverDir;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Self self;
|
||||
|
||||
|
@ -23,7 +23,6 @@ class Self
|
||||
protected:
|
||||
static EFI_STATUS __initialize(XBool debugMsg, EFI_HANDLE m_SelfImageHandle, EFI_LOADED_IMAGE** m_SelfLoadedImage, EFI_SIMPLE_FILE_SYSTEM_PROTOCOL** m_SelfSimpleVolumePtr, EFI_FILE** m_SelfVolumeRootDirPtr, XStringW* m_CloverDirFullPathPtr, XStringW* m_efiFileNamePtr, EFI_FILE** m_CloverDirPtr);
|
||||
public:
|
||||
static const EFI_FILE_PROTOCOL* getCloverDirAndEfiFileName(EFI_HANDLE ImageHandle, XStringW* efiFileName);
|
||||
|
||||
protected:
|
||||
EFI_HANDLE m_SelfImageHandle {}; // this efi.
|
||||
@ -76,8 +75,10 @@ public:
|
||||
const EFI_FILE& getSelfVolumeRootDir() { checkInitialized(); return *m_SelfVolumeRootDir; }
|
||||
|
||||
const XStringW& getCloverEfiFileName() { checkInitialized(); return m_efiFileName; }
|
||||
const XStringW& getCloverEfiFileNameOrNull() { return m_efiFileName; }
|
||||
const EFI_DEVICE_PATH& getCloverDirFullDevicePath() { checkInitialized(); return *m_CloverDirFullDevicePath; }
|
||||
const EFI_FILE& getCloverDir() { checkInitialized(); return *m_CloverDir; }
|
||||
const EFI_FILE& getCloverDirOrNull() { return *m_CloverDir; }
|
||||
const XStringW& getCloverDirFullPath() { checkInitialized(); return m_CloverDirFullPath; }
|
||||
const XStringW& getCloverDirFullPath4Display() { checkInitialized(); return m_CloverDirFullPath4Display; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user