parent
c87858c5f0
commit
e80852a82f
|
@ -273,7 +273,11 @@ MemLogVA (
|
||||||
// Add log to buffer
|
// Add log to buffer
|
||||||
//
|
//
|
||||||
LastMessage = mMemLog->Cursor;
|
LastMessage = mMemLog->Cursor;
|
||||||
|
#ifdef JIEF_DEBUG
|
||||||
|
if (0) {
|
||||||
|
#else
|
||||||
if (Timing) {
|
if (Timing) {
|
||||||
|
#endif
|
||||||
//
|
//
|
||||||
// Write timing only at the beginning of a new line
|
// Write timing only at the beginning of a new line
|
||||||
//
|
//
|
||||||
|
@ -532,7 +536,11 @@ MemLogfVA (
|
||||||
//
|
//
|
||||||
UINTN LastMessage = mMemLog->Cursor - mMemLog->Buffer;
|
UINTN LastMessage = mMemLog->Cursor - mMemLog->Buffer;
|
||||||
|
|
||||||
|
#ifdef JIEF_DEBUG
|
||||||
|
vprintf_with_callback_timestamp_emitcr(Format, Marker, transmitS8Printf, NULL, &printfNewline, 0, 1);
|
||||||
|
#else
|
||||||
vprintf_with_callback_timestamp_emitcr(Format, Marker, transmitS8Printf, NULL, &printfNewline, Timing, 1);
|
vprintf_with_callback_timestamp_emitcr(Format, Marker, transmitS8Printf, NULL, &printfNewline, Timing, 1);
|
||||||
|
#endif
|
||||||
size_t DataWritten = mMemLog->Cursor - mMemLog->Buffer - LastMessage;
|
size_t DataWritten = mMemLog->Cursor - mMemLog->Buffer - LastMessage;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -14,20 +14,20 @@
|
||||||
class SelfOem
|
class SelfOem
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
XString8 m_ConfName;
|
XString8 m_ConfName = NullXString8; // Initialisation required by -Weffc++. Couldn't use default ctor.
|
||||||
|
|
||||||
// bool m_OemDirExists;
|
// bool m_OemDirExists;
|
||||||
EFI_FILE* m_OemDir = NULL;
|
EFI_FILE* m_OemDir = NULL;
|
||||||
XStringW m_OemPathRelToSelfDir;
|
XStringW m_OemPathRelToSelfDir = NullXStringW;
|
||||||
XStringW m_OemFulPath;
|
XStringW m_OemFulPath = NullXStringW;
|
||||||
|
|
||||||
// const EFI_FILE* m_userConfigDir = NULL;
|
// const EFI_FILE* m_userConfigDir = NULL;
|
||||||
XStringW m_configDirPathRelToSelfDir; // could also be empty if config dir is clover dir.
|
XStringW m_configDirPathRelToSelfDir = NullXStringW; // could also be empty if config dir is clover dir.
|
||||||
XStringW m_configDirPathRelToSelfDirWithTrailingSlash; // could also be empty if config dir is clover dir.
|
XStringW m_configDirPathRelToSelfDirWithTrailingSlash = NullXStringW; // could also be empty if config dir is clover dir.
|
||||||
|
|
||||||
EFI_FILE* m_KextsDir = NULL;
|
EFI_FILE* m_KextsDir = NULL;
|
||||||
XStringW m_KextsPathRelToSelfDir;
|
XStringW m_KextsPathRelToSelfDir = NullXStringW;
|
||||||
XStringW m_KextsFullPath;
|
XStringW m_KextsFullPath = NullXStringW;
|
||||||
|
|
||||||
// EFI_STATUS _openDir(const XStringW& path, bool* b, EFI_FILE** efiDir);
|
// EFI_STATUS _openDir(const XStringW& path, bool* b, EFI_FILE** efiDir);
|
||||||
bool _checkOEMPath();
|
bool _checkOEMPath();
|
||||||
|
|
|
@ -1556,6 +1556,14 @@ BOOLEAN IsOSValid(const XString8& MatchOS, const XString8& CurrOS)
|
||||||
XString8Array osToc = Split<XString8Array>(MatchOS, "."_XS8).trimEachString();
|
XString8Array osToc = Split<XString8Array>(MatchOS, "."_XS8).trimEachString();
|
||||||
XString8Array currOStoc = Split<XString8Array>(CurrOS, "."_XS8).trimEachString();
|
XString8Array currOStoc = Split<XString8Array>(CurrOS, "."_XS8).trimEachString();
|
||||||
|
|
||||||
|
|
||||||
|
if ( osToc.size() > 0 && currOStoc.size() > 0 && osToc[0] == "11"_XS8 && currOStoc[0] == "11"_XS8 ) {
|
||||||
|
if (osToc.size() == 1 ) return true;
|
||||||
|
if (osToc.size() == 2 ) {
|
||||||
|
if ( osToc[1].equalIC("x") ) return true;
|
||||||
|
if ( currOStoc.size() == 2 && osToc[1] == currOStoc[1] ) return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (osToc.size() == 2) {
|
if (osToc.size() == 2) {
|
||||||
if (currOStoc.size() == 2) {
|
if (currOStoc.size() == 2) {
|
||||||
if ( osToc[0] == currOStoc[0] && osToc[1] == currOStoc[1]) {
|
if ( osToc[0] == currOStoc[0] && osToc[1] == currOStoc[1]) {
|
||||||
|
|
|
@ -36,25 +36,31 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
// Overload post/pre increment
|
// Overload post/pre increment
|
||||||
void operator++()
|
Counter& operator++()
|
||||||
{
|
{
|
||||||
m_counter++;
|
m_counter++;
|
||||||
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
void operator++(int)
|
// Counter operator++(int)
|
||||||
{
|
// {
|
||||||
m_counter++;
|
// Counter tmp = *this;
|
||||||
}
|
// m_counter++;
|
||||||
|
// return tmp;
|
||||||
// Overload post/pre decrement
|
// }
|
||||||
void operator--()
|
//
|
||||||
{
|
// // Overload post/pre decrement
|
||||||
m_counter--;
|
Counter& operator--()
|
||||||
}
|
|
||||||
void operator--(int)
|
|
||||||
{
|
{
|
||||||
m_counter--;
|
m_counter--;
|
||||||
|
return *this;
|
||||||
}
|
}
|
||||||
|
// Counter operator--(int)
|
||||||
|
// {
|
||||||
|
// Counter tmp = *this;
|
||||||
|
// m_counter--;
|
||||||
|
// return tmp;
|
||||||
|
// }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
unsigned int m_counter{};
|
unsigned int m_counter{};
|
||||||
|
@ -71,7 +77,7 @@ public:
|
||||||
m_ptr = ptr;
|
m_ptr = ptr;
|
||||||
m_counter = new Counter();
|
m_counter = new Counter();
|
||||||
if (ptr) {
|
if (ptr) {
|
||||||
(*m_counter)++;
|
++(*m_counter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,7 +86,7 @@ public:
|
||||||
{
|
{
|
||||||
m_ptr = sp.m_ptr;
|
m_ptr = sp.m_ptr;
|
||||||
m_counter = sp.m_counter;
|
m_counter = sp.m_counter;
|
||||||
(*m_counter)++;
|
++(*m_counter);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reference count
|
// Reference count
|
||||||
|
@ -107,7 +113,7 @@ public:
|
||||||
// Destructor
|
// Destructor
|
||||||
~Shared_ptr()
|
~Shared_ptr()
|
||||||
{
|
{
|
||||||
(*m_counter)--;
|
--(*m_counter);
|
||||||
if (m_counter->get() == 0) {
|
if (m_counter->get() == 0) {
|
||||||
delete m_counter;
|
delete m_counter;
|
||||||
delete m_ptr;
|
delete m_ptr;
|
||||||
|
|
|
@ -21,7 +21,7 @@ class XTheme
|
||||||
public:
|
public:
|
||||||
XObjArray<XIcon> Icons;
|
XObjArray<XIcon> Icons;
|
||||||
protected:
|
protected:
|
||||||
XStringW m_ThemePath;
|
XStringW m_ThemePath = NullXStringW;
|
||||||
EFI_FILE *ThemeDir;
|
EFI_FILE *ThemeDir;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
Loading…
Reference in New Issue