mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2025-01-11 19:22:14 +01:00
Convert bool to XBool.
This commit is contained in:
parent
7b23e6ba3c
commit
83593a5ab9
@ -3334,6 +3334,7 @@
|
||||
"-Wignored-qualifiers",
|
||||
"-Wreorder",
|
||||
"-Wmissing-braces",
|
||||
"-Wnon-pod-varargs",
|
||||
);
|
||||
};
|
||||
name = Debug;
|
||||
@ -3434,6 +3435,7 @@
|
||||
"-Wignored-qualifiers",
|
||||
"-Wreorder",
|
||||
"-Wmissing-braces",
|
||||
"-Wnon-pod-varargs",
|
||||
);
|
||||
};
|
||||
name = Release;
|
||||
|
@ -1451,7 +1451,7 @@ void SaveOemTables()
|
||||
// EFI_STATUS Status;
|
||||
void *RsdPtr;
|
||||
XStringW AcpiOriginPath = L"ACPI\\origin"_XSW;
|
||||
XBool Saved = false;
|
||||
XBool Saved = false;
|
||||
CHAR8 *MemLogStart;
|
||||
UINTN MemLogStartLen;
|
||||
|
||||
@ -1716,8 +1716,8 @@ EFI_STATUS PatchACPI(IN REFIT_VOLUME *Volume, const MacOsVersion& OSVersion)
|
||||
// UINTN ApicLen;
|
||||
UINTN ApicCPUNum;
|
||||
UINT8 *SubTable;
|
||||
XBool DsdtLoaded = false;
|
||||
XBool NeedUpdate = false;
|
||||
XBool DsdtLoaded = false;
|
||||
XBool NeedUpdate = false;
|
||||
OPER_REGION *tmpRegion;
|
||||
// XStringW AcpiOemPath = SWPrintf("%ls\\ACPI\\patched", OEMPath.wc_str());
|
||||
|
||||
|
@ -432,8 +432,8 @@ EFI_STATUS BdsLibConnectMostlyAllEfi()
|
||||
EFI_HANDLE *HandleBuffer = NULL;
|
||||
UINT32 *HandleType = NULL;
|
||||
UINTN HandleIndex;
|
||||
XBool Parent;
|
||||
XBool Device;
|
||||
XBool Parent;
|
||||
XBool Device;
|
||||
EFI_PCI_IO_PROTOCOL* PciIo = NULL;
|
||||
PCI_TYPE00 Pci;
|
||||
|
||||
@ -552,7 +552,7 @@ BdsLibConnectUsbDevByShortFormDP(
|
||||
UINTN Index;
|
||||
EFI_PCI_IO_PROTOCOL *PciIo;
|
||||
UINT8 Class[3];
|
||||
XBool AtLeastOneConnected;
|
||||
XBool AtLeastOneConnected;
|
||||
|
||||
//
|
||||
// Check the passed in parameters
|
||||
|
@ -168,9 +168,9 @@ Clover_FindDevicePathNodeWithType (
|
||||
*/
|
||||
EFI_STATUS
|
||||
CreateBootOptionDevicePath (
|
||||
IN EFI_HANDLE FileDeviceHandle,
|
||||
IN EFI_HANDLE FileDeviceHandle,
|
||||
IN CONST XStringW& FileName,
|
||||
IN XBool UseShortForm,
|
||||
IN XBool UseShortForm,
|
||||
OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath
|
||||
)
|
||||
{
|
||||
@ -226,7 +226,7 @@ DevicePathEqual (
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath2
|
||||
)
|
||||
{
|
||||
XBool Equal;
|
||||
XBool Equal;
|
||||
UINT8 Type1;
|
||||
UINT8 SubType1;
|
||||
UINTN Len1;
|
||||
@ -831,7 +831,7 @@ FindBootOptionForFile (
|
||||
/** Prints BootXXXX vars found listed in BootOrder, plus print others if AllBootOptions == true. */
|
||||
void
|
||||
PrintBootOptions (
|
||||
IN XBool AllBootOptions
|
||||
IN XBool AllBootOptions
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
@ -840,7 +840,7 @@ PrintBootOptions (
|
||||
UINTN Index;
|
||||
UINTN BootNum;
|
||||
BO_BOOT_OPTION BootOption;
|
||||
XBool FoundOthers;
|
||||
XBool FoundOthers;
|
||||
|
||||
|
||||
DBG("\nBoot options:\n-------------\n");
|
||||
@ -997,13 +997,13 @@ AddBootOption (
|
||||
*/
|
||||
EFI_STATUS
|
||||
AddBootOptionForFile (
|
||||
IN EFI_HANDLE FileDeviceHandle,
|
||||
IN EFI_HANDLE FileDeviceHandle,
|
||||
IN CONST XStringW& FileName,
|
||||
IN XBool UseShortForm,
|
||||
IN CONST CHAR16 *Description,
|
||||
IN XBool UseShortForm,
|
||||
IN CONST CHAR16 *Description,
|
||||
IN UINT8 *OptionalData,
|
||||
IN UINTN OptionalDataSize,
|
||||
IN UINTN BootIndex,
|
||||
IN UINTN OptionalDataSize,
|
||||
IN UINTN BootIndex,
|
||||
OUT UINT16 *BootNum
|
||||
)
|
||||
{
|
||||
|
@ -122,14 +122,14 @@ FindBootOptionForFile (
|
||||
*/
|
||||
EFI_STATUS
|
||||
AddBootOptionForFile (
|
||||
IN EFI_HANDLE FileDeviceHandle,
|
||||
IN EFI_HANDLE FileDeviceHandle,
|
||||
IN CONST XStringW &FileName,
|
||||
IN XBool UseShortForm,
|
||||
IN CONST CHAR16 *Description,
|
||||
IN UINT8 *OptionalData,
|
||||
IN UINTN OptionalDataSize,
|
||||
IN UINTN BootIndex,
|
||||
OUT UINT16 *BootNum
|
||||
IN XBool UseShortForm,
|
||||
IN CONST CHAR16 *Description,
|
||||
IN UINT8 *OptionalData,
|
||||
IN UINTN OptionalDataSize,
|
||||
IN UINTN BootIndex,
|
||||
OUT UINT16 *BootNum
|
||||
);
|
||||
|
||||
/** Deletes boot option specified with BootNum (XXXX in BootXXXX var name). */
|
||||
|
@ -173,14 +173,14 @@ GetNextDataRecord (
|
||||
{
|
||||
EFI_DATA_ENTRY *LogEntry;
|
||||
LIST_ENTRY *Link;
|
||||
XBool ReturnFirstEntry;
|
||||
XBool ReturnFirstEntry;
|
||||
EFI_DATA_RECORD_HEADER *Record;
|
||||
EFI_DATA_ENTRY *NextLogEntry;
|
||||
|
||||
//
|
||||
// If MonotonicCount == 0 just return the first one
|
||||
//
|
||||
ReturnFirstEntry = (XBool) (*PtrCurrentMTC == 0);
|
||||
ReturnFirstEntry = *PtrCurrentMTC == 0;
|
||||
|
||||
Record = NULL;
|
||||
for (Link = GetFirstNode(Head); Link != Head; Link = GetNextNode(Head, Link)) {
|
||||
|
@ -467,7 +467,7 @@ SetupDataForOSX(XBool Hibernate)
|
||||
UINT64 ARTFrequency;
|
||||
UINTN Revision;
|
||||
UINT16 Zero = 0;
|
||||
XBool isRevLess = (ApplePlatformData[GlobalConfig.CurrentModel].smcRevision[0] == 0 &&
|
||||
XBool isRevLess = (ApplePlatformData[GlobalConfig.CurrentModel].smcRevision[0] == 0 &&
|
||||
ApplePlatformData[GlobalConfig.CurrentModel].smcRevision[1] == 0 &&
|
||||
ApplePlatformData[GlobalConfig.CurrentModel].smcRevision[2] == 0 &&
|
||||
ApplePlatformData[GlobalConfig.CurrentModel].smcRevision[3] == 0 &&
|
||||
|
@ -1231,7 +1231,7 @@ XBool GetName(UINT8 *dsdt, INT32 adr, OUT CHAR8* name, OUT INTN *shift)
|
||||
XBool CmpAdr (UINT8 *dsdt, UINT32 j, UINT32 PciAdr)
|
||||
{
|
||||
// Name (_ADR, 0x001f0001)
|
||||
return (XBool)
|
||||
return
|
||||
((dsdt[j + 4] == 0x08) &&
|
||||
(dsdt[j + 5] == 0x5F) &&
|
||||
(dsdt[j + 6] == 0x41) &&
|
||||
@ -1267,7 +1267,7 @@ XBool CmpPNP (UINT8 *dsdt, UINT32 j, UINT16 PNP)
|
||||
{
|
||||
// Name (_HID, EisaId ("PNP0C0F")) for PNP=0x0C0F BigEndian
|
||||
if (PNP == 0) {
|
||||
return (XBool)
|
||||
return
|
||||
((dsdt[j + 0] == 0x08) &&
|
||||
(dsdt[j + 1] == 0x5F) &&
|
||||
(dsdt[j + 2] == 0x48) &&
|
||||
@ -1277,7 +1277,7 @@ XBool CmpPNP (UINT8 *dsdt, UINT32 j, UINT16 PNP)
|
||||
(dsdt[j + 6] == 0x41) &&
|
||||
(dsdt[j + 7] == 0xD0));
|
||||
}
|
||||
return (XBool)
|
||||
return
|
||||
((dsdt[j + 0] == 0x08) &&
|
||||
(dsdt[j + 1] == 0x5F) &&
|
||||
(dsdt[j + 2] == 0x48) &&
|
||||
@ -4265,14 +4265,14 @@ UINT8 VenIDE[] = {0x86,0x80,0x00,0x00};
|
||||
|
||||
UINT32 FIXIDE (UINT8 *dsdt, UINT32 len)
|
||||
{
|
||||
UINT32 i, k;
|
||||
UINT32 j;
|
||||
UINT32 IDEADR = 0, BridgeSize = 0, Size;
|
||||
INT32 sizeoffset;
|
||||
UINT32 i, k;
|
||||
UINT32 j;
|
||||
UINT32 IDEADR = 0, BridgeSize = 0, Size;
|
||||
INT32 sizeoffset;
|
||||
AML_CHUNK *root;
|
||||
AML_CHUNK *device;
|
||||
CHAR8 *ide;
|
||||
XBool PATAFIX=true;
|
||||
XBool PATAFIX=true;
|
||||
AML_CHUNK *met, *met2;
|
||||
AML_CHUNK *pack;
|
||||
AML_CHUNK *device1;
|
||||
|
@ -712,13 +712,13 @@ STATIC CHAR16 OffsetHexStr[100];
|
||||
XBool
|
||||
IsOsxHibernated (IN LOADER_ENTRY *Entry)
|
||||
{
|
||||
EFI_STATUS Status = EFI_SUCCESS;
|
||||
UINTN Size = 0;
|
||||
EFI_STATUS Status = EFI_SUCCESS;
|
||||
UINTN Size = 0;
|
||||
UINT8 *Data = NULL;
|
||||
// REFIT_VOLUME *ThisVolume = Entry->Volume;
|
||||
REFIT_VOLUME *Volume = Entry->Volume;
|
||||
EFI_GUID *BootGUID = NULL;
|
||||
XBool ret = false;
|
||||
XBool ret = false;
|
||||
UINT8 *Value = NULL;
|
||||
|
||||
// UINTN VolumeIndex;
|
||||
@ -986,9 +986,9 @@ PrepareHibernation (IN REFIT_VOLUME *Volume)
|
||||
UINT8 *VarData = NULL;
|
||||
REFIT_VOLUME *SleepImageVolume;
|
||||
UINT32 Attributes;
|
||||
XBool HasIORTCVariables = false;
|
||||
XBool HasHibernateInfo = false;
|
||||
XBool HasHibernateInfoInRTC = false;
|
||||
XBool HasIORTCVariables = false;
|
||||
XBool HasHibernateInfo = false;
|
||||
XBool HasHibernateInfoInRTC = false;
|
||||
|
||||
DBG("PrepareHibernation:\n");
|
||||
|
||||
|
@ -341,7 +341,7 @@ EFI_KEYBOARD_INFO_PROTOCOL mKeyboardInfo = {
|
||||
//EFIAPI
|
||||
//GetQuirksConfig (IN OCQUIRKS_PROTOCOL *This,
|
||||
// OUT OC_ABC_SETTINGS_4CLOVER *Buffer,
|
||||
// OUT XBool *GopEnable
|
||||
// OUT XBool *GopEnable
|
||||
// )
|
||||
//{
|
||||
// DBG("GetQuirksConfig called\n");
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include "KERNEL_AND_KEXT_PATCHES.h"
|
||||
#include "MacOsVersion.h"
|
||||
|
||||
bool ABSTRACT_PATCH::IsPatchEnabledByBuildNumber(const XString8& Build)
|
||||
XBool ABSTRACT_PATCH::IsPatchEnabledByBuildNumber(const XString8& Build)
|
||||
{
|
||||
XBool ret = false;
|
||||
|
||||
@ -35,7 +35,7 @@ bool ABSTRACT_PATCH::IsPatchEnabledByBuildNumber(const XString8& Build)
|
||||
}
|
||||
|
||||
|
||||
bool ABSTRACT_PATCH::IsPatchEnabled(const MacOsVersion& CurrOS)
|
||||
XBool ABSTRACT_PATCH::IsPatchEnabled(const MacOsVersion& CurrOS)
|
||||
{
|
||||
XBool ret = false;
|
||||
|
||||
@ -63,7 +63,7 @@ bool ABSTRACT_PATCH::IsPatchEnabled(const MacOsVersion& CurrOS)
|
||||
|
||||
|
||||
//
|
||||
//bool KERNEL_AND_KEXT_PATCHES::IsPatchEnabledByBuildNumber(const XString8& Build)
|
||||
//XBool KERNEL_AND_KEXT_PATCHES::IsPatchEnabledByBuildNumber(const XString8& Build)
|
||||
//{
|
||||
// XBool ret = false;
|
||||
//
|
||||
|
@ -22,7 +22,7 @@ extern "C" {
|
||||
class ABSTRACT_PATCH
|
||||
{
|
||||
public:
|
||||
bool Disabled = bool();
|
||||
XBool Disabled = XBool();
|
||||
XBuffer<UINT8> Find = XBuffer<UINT8> ();
|
||||
XBuffer<UINT8> Replace = XBuffer<UINT8> ();
|
||||
XBuffer<UINT8> MaskFind = XBuffer<UINT8> ();
|
||||
@ -43,9 +43,9 @@ public:
|
||||
virtual ~ABSTRACT_PATCH() {}
|
||||
|
||||
#if __cplusplus > 201703L
|
||||
bool operator == (const ABSTRACT_PATCH&) const = default;
|
||||
XBool operator == (const ABSTRACT_PATCH&) const = default;
|
||||
#endif
|
||||
bool isEqual(const ABSTRACT_PATCH& other) const
|
||||
XBool isEqual(const ABSTRACT_PATCH& other) const
|
||||
{
|
||||
if ( !(Disabled == other.Disabled ) ) return false;
|
||||
if ( !(Find == other.Find ) ) return false;
|
||||
@ -82,8 +82,8 @@ public:
|
||||
}
|
||||
|
||||
/** Returns a boolean and then enable disable the patch if MachOSEntry have a match for the booted OS. */
|
||||
bool IsPatchEnabledByBuildNumber(const XString8& Build);
|
||||
bool IsPatchEnabled(const MacOsVersion& CurrOS);
|
||||
XBool IsPatchEnabledByBuildNumber(const XString8& Build);
|
||||
XBool IsPatchEnabled(const MacOsVersion& CurrOS);
|
||||
|
||||
|
||||
};
|
||||
@ -96,15 +96,15 @@ public:
|
||||
|
||||
|
||||
#if __cplusplus > 201703L
|
||||
bool operator == (const ABSTRACT_KEXT_OR_KERNEL_PATCH&) const = default;
|
||||
XBool operator == (const ABSTRACT_KEXT_OR_KERNEL_PATCH&) const = default;
|
||||
#endif
|
||||
bool isEqual(const ABSTRACT_KEXT_OR_KERNEL_PATCH& other) const
|
||||
XBool isEqual(const ABSTRACT_KEXT_OR_KERNEL_PATCH& other) const
|
||||
{
|
||||
if ( !super::isEqual (other) ) return false;
|
||||
if ( !(ProcedureName == other.ProcedureName ) ) return false;
|
||||
return true;
|
||||
}
|
||||
bool takeValueFrom(const ConfigPlistClass::KernelAndKextPatches_Class::ABSTRACT_KEXT_OR_KERNEL_PATCH& other)
|
||||
XBool takeValueFrom(const ConfigPlistClass::KernelAndKextPatches_Class::ABSTRACT_KEXT_OR_KERNEL_PATCH& other)
|
||||
{
|
||||
super::takeValueFrom(other);
|
||||
ProcedureName = other.dgetProcedureName();
|
||||
@ -119,15 +119,15 @@ class KEXT_PATCH : public ABSTRACT_KEXT_OR_KERNEL_PATCH
|
||||
using super = ABSTRACT_KEXT_OR_KERNEL_PATCH;
|
||||
public:
|
||||
XString8 Name = XString8();
|
||||
bool IsPlistPatch = XBool();
|
||||
XBool IsPlistPatch = XBool();
|
||||
|
||||
|
||||
virtual XString8 getName() const { return Name; }
|
||||
|
||||
#if __cplusplus > 201703L
|
||||
bool operator == (const KEXT_PATCH&) const = default;
|
||||
XBool operator == (const KEXT_PATCH&) const = default;
|
||||
#endif
|
||||
bool isEqual(const KEXT_PATCH& other) const
|
||||
XBool isEqual(const KEXT_PATCH& other) const
|
||||
{
|
||||
if ( !super::isEqual (other) ) return false;
|
||||
if ( !(Name == other.Name ) ) return false;
|
||||
@ -150,9 +150,9 @@ public:
|
||||
virtual XString8 getName() const { return "kernel"_XS8; }
|
||||
|
||||
#if __cplusplus > 201703L
|
||||
bool operator == (const KERNEL_PATCH&) const = default;
|
||||
XBool operator == (const KERNEL_PATCH&) const = default;
|
||||
#endif
|
||||
bool isEqual(const KERNEL_PATCH& other) const
|
||||
XBool isEqual(const KERNEL_PATCH& other) const
|
||||
{
|
||||
if ( !super::isEqual (other) ) return false;
|
||||
return true;
|
||||
@ -171,9 +171,9 @@ public:
|
||||
virtual XString8 getName() const { return "boot.efi"_XS8; }
|
||||
|
||||
#if __cplusplus > 201703L
|
||||
bool operator == (const BOOT_PATCH&) const = default;
|
||||
XBool operator == (const BOOT_PATCH&) const = default;
|
||||
#endif
|
||||
bool isEqual(const BOOT_PATCH& other) const
|
||||
XBool isEqual(const BOOT_PATCH& other) const
|
||||
{
|
||||
if ( !super::isEqual (other) ) return false;
|
||||
return true;
|
||||
@ -187,15 +187,15 @@ public:
|
||||
class KERNEL_AND_KEXT_PATCHES
|
||||
{
|
||||
public:
|
||||
bool KPDebug = bool();
|
||||
bool KPKernelLapic = bool();
|
||||
bool KPKernelXCPM = bool();
|
||||
bool _KPKernelPm = bool();
|
||||
bool KPPanicNoKextDump = bool();
|
||||
bool _KPAppleIntelCPUPM = bool();
|
||||
bool KPAppleRTC = bool();
|
||||
bool EightApple = bool();
|
||||
bool KPDELLSMBIOS = bool(); // Dell SMBIOS patch
|
||||
XBool KPDebug = XBool();
|
||||
XBool KPKernelLapic = XBool();
|
||||
XBool KPKernelXCPM = XBool();
|
||||
XBool _KPKernelPm = XBool();
|
||||
XBool KPPanicNoKextDump = XBool();
|
||||
XBool _KPAppleIntelCPUPM = XBool();
|
||||
XBool KPAppleRTC = XBool();
|
||||
XBool EightApple = XBool();
|
||||
XBool KPDELLSMBIOS = XBool(); // Dell SMBIOS patch
|
||||
UINT32 FakeCPUID = UINT32();
|
||||
XString8 KPATIConnectorsController = XString8();
|
||||
XBuffer<UINT8> KPATIConnectorsData = XBuffer<UINT8>();
|
||||
@ -208,9 +208,9 @@ public:
|
||||
KERNEL_AND_KEXT_PATCHES() : ForceKextsToLoad(), KextPatches(), KernelPatches(), BootPatches() {}
|
||||
|
||||
#if __cplusplus > 201703L
|
||||
bool operator == (const KERNEL_AND_KEXT_PATCHES&) const = default;
|
||||
XBool operator == (const KERNEL_AND_KEXT_PATCHES&) const = default;
|
||||
#endif
|
||||
bool isEqual(const KERNEL_AND_KEXT_PATCHES& other) const
|
||||
XBool isEqual(const KERNEL_AND_KEXT_PATCHES& other) const
|
||||
{
|
||||
if ( !(KPDebug == other.KPDebug ) ) return false;
|
||||
if ( !(KPKernelLapic == other.KPKernelLapic ) ) return false;
|
||||
|
@ -66,17 +66,17 @@ XStringW GetBundleVersion(const XStringW& pathUnderSelf)
|
||||
void GetListOfInjectKext(CHAR16 *KextDirNameUnderOEMPath)
|
||||
{
|
||||
|
||||
REFIT_DIR_ITER DirIter;
|
||||
EFI_FILE_INFO* DirEntry;
|
||||
SIDELOAD_KEXT* mKext;
|
||||
SIDELOAD_KEXT* mPlugInKext;
|
||||
XStringW FullName;
|
||||
REFIT_DIR_ITER DirIter;
|
||||
EFI_FILE_INFO *DirEntry;
|
||||
SIDELOAD_KEXT *mKext;
|
||||
SIDELOAD_KEXT *mPlugInKext;
|
||||
XStringW FullName;
|
||||
// XStringW FullPath = SWPrintf("%ls\\KEXTS\\%ls", OEMPath.wc_str(), KextDirNameUnderOEMPath);
|
||||
REFIT_DIR_ITER PlugInsIter;
|
||||
REFIT_DIR_ITER PlugInsIter;
|
||||
EFI_FILE_INFO *PlugInEntry;
|
||||
XStringW PlugInsPath;
|
||||
XStringW PlugInsPath;
|
||||
XStringW PlugInsName;
|
||||
XBool Blocked = false;
|
||||
XBool Blocked = false;
|
||||
|
||||
if( !selfOem.isKextsDirFound() ) return;
|
||||
|
||||
|
@ -214,8 +214,8 @@ LegacyBiosInt86 (
|
||||
UINTN Status;
|
||||
UINTN Eflags;
|
||||
IA32_REGISTER_SET ThunkRegSet;
|
||||
XBool Ret;
|
||||
UINT16 *Stack16;
|
||||
XBool Ret;
|
||||
UINT16 *Stack16;
|
||||
|
||||
ZeroMem (&ThunkRegSet, sizeof (ThunkRegSet));
|
||||
ThunkRegSet.E.EFLAGS.Bits.Reserved_0 = 1;
|
||||
@ -295,7 +295,7 @@ LegacyBiosInt86 (
|
||||
|
||||
CopyMem(&(Regs->E.EFLAGS), &(ThunkRegSet.E.EFLAGS), sizeof (UINT32));
|
||||
|
||||
Ret = (XBool) (Regs->E.EFLAGS.Bits.CF == 1);
|
||||
Ret = Regs->E.EFLAGS.Bits.CF == 1;
|
||||
|
||||
return Ret;
|
||||
}
|
||||
@ -311,17 +311,17 @@ LegacyBiosFarCall86 (
|
||||
// IN UINTN StackSize
|
||||
)
|
||||
{
|
||||
UINTN Status;
|
||||
UINT32 Eflags;
|
||||
IA32_REGISTER_SET ThunkRegSet;
|
||||
XBool Ret;
|
||||
UINT16 *Stack16;
|
||||
UINTN Status;
|
||||
UINT32 Eflags;
|
||||
IA32_REGISTER_SET ThunkRegSet;
|
||||
XBool Ret;
|
||||
UINT16 *Stack16;
|
||||
// UINT16 BiosInt = 0x100;
|
||||
EFI_TPL OriginalTpl;
|
||||
EFI_TPL OriginalTpl;
|
||||
EFI_TIMER_ARCH_PROTOCOL *Timer;
|
||||
UINT64 TimerPeriod = 0;
|
||||
UINT64 TimerPeriod = 0;
|
||||
#if ENABLE_PS2MOUSE_LEGACYBOOT == 1
|
||||
UINT16 LegacyMaskOld, LegacyMaskNew;
|
||||
UINT16 LegacyMaskOld, LegacyMaskNew;
|
||||
#endif
|
||||
|
||||
// Disconnect EFI VGA driver (and switch to Text VGA Mode)
|
||||
@ -449,7 +449,7 @@ LegacyBiosFarCall86 (
|
||||
|
||||
CopyMem(&(Regs->E.EFLAGS), &(ThunkRegSet.E.EFLAGS), sizeof (UINT32));
|
||||
|
||||
Ret = (XBool) (Regs->E.EFLAGS.Bits.CF == 1);
|
||||
Ret = Regs->E.EFLAGS.Bits.CF == 1;
|
||||
|
||||
// Connect VGA EFI Driver
|
||||
BdsLibConnectAllDriversToAllControllers();
|
||||
|
@ -26,8 +26,8 @@ class AbstractMacOsVersion
|
||||
int nbElement() const { int idx; for ( idx=0 ; idx < nbMaxElement && versionsNumber[idx] != -1 ; idx++ ) {}; return idx; }
|
||||
int lastElement() const { int idx; for ( idx=1 ; idx < nbMaxElement && versionsNumber[idx] != -1 ; idx++ ) {}; return versionsNumber[idx-1]; }
|
||||
void setEmpty() { lastError.setEmpty(); for ( size_t idx=0 ; idx < nbMaxElement ; idx++ ) versionsNumber[idx] = -1; }
|
||||
bool isEmpty() const { return versionsNumber[0] == -1; }
|
||||
bool notEmpty() const { return !isEmpty(); }
|
||||
XBool isEmpty() const { return versionsNumber[0] == -1; }
|
||||
XBool notEmpty() const { return !isEmpty(); }
|
||||
|
||||
template<typename IntegralType, enable_if(is_integral(IntegralType))>
|
||||
int elementAt(IntegralType i) const {
|
||||
@ -230,7 +230,7 @@ class MacOsVersion : public AbstractMacOsVersion
|
||||
}
|
||||
|
||||
|
||||
bool match(const MacOsVersionPattern& pattern) const
|
||||
XBool match(const MacOsVersionPattern& pattern) const
|
||||
{
|
||||
// int nbMax = nbElemen() <= pattern.nbMaxElement ? nbMaxElement : pattern.nbMaxElement;
|
||||
int idx;
|
||||
@ -251,16 +251,16 @@ class MacOsVersion : public AbstractMacOsVersion
|
||||
return false;
|
||||
}
|
||||
|
||||
bool operator ==(const MacOsVersion &other) const
|
||||
XBool operator ==(const MacOsVersion &other) const
|
||||
{
|
||||
for ( size_t idx=0 ; idx < nbMaxElement ; idx++ ) {
|
||||
if ( versionsNumber[idx] != other.elementAt(idx) ) return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
bool operator !=(const MacOsVersion &other) const { return ! ( *this == other); }
|
||||
XBool operator !=(const MacOsVersion &other) const { return ! ( *this == other); }
|
||||
|
||||
bool operator <(const MacOsVersion &other) const
|
||||
XBool operator <(const MacOsVersion &other) const
|
||||
{
|
||||
for ( size_t idx=0 ; idx < nbMaxElement ; idx++ ) {
|
||||
if ( versionsNumber[idx] < other.elementAt(idx) ) return true;
|
||||
@ -268,9 +268,9 @@ class MacOsVersion : public AbstractMacOsVersion
|
||||
}
|
||||
return false; // here, means it's equal
|
||||
};
|
||||
bool operator >=(const MacOsVersion &other) const { return ! ( *this < other); }
|
||||
XBool operator >=(const MacOsVersion &other) const { return ! ( *this < other); }
|
||||
|
||||
bool operator >(const MacOsVersion &other) const
|
||||
XBool operator >(const MacOsVersion &other) const
|
||||
{
|
||||
for ( size_t idx=0 ; idx < nbMaxElement ; idx++ ) {
|
||||
if ( versionsNumber[idx] > other.elementAt(idx) ) return true;
|
||||
@ -278,7 +278,7 @@ class MacOsVersion : public AbstractMacOsVersion
|
||||
}
|
||||
return false; // here, means it's equal
|
||||
};
|
||||
bool operator <=(const MacOsVersion &other) const { return ! ( *this > other); }
|
||||
XBool operator <=(const MacOsVersion &other) const { return ! ( *this > other); }
|
||||
};
|
||||
|
||||
|
||||
|
@ -372,7 +372,7 @@ ResetNativeNvram ()
|
||||
CHAR16 *Name;
|
||||
UINTN NameSize;
|
||||
UINTN NewNameSize;
|
||||
XBool Restart = true;
|
||||
XBool Restart = true;
|
||||
UINTN VolumeIndex;
|
||||
REFIT_VOLUME *Volume;
|
||||
EFI_FILE* FileHandle;
|
||||
@ -636,7 +636,7 @@ BootVolumeDevicePathEqual (
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath2
|
||||
)
|
||||
{
|
||||
XBool Equal;
|
||||
XBool Equal;
|
||||
UINT8 Type1;
|
||||
UINT8 SubType1;
|
||||
UINT8 Type2;
|
||||
@ -645,7 +645,7 @@ BootVolumeDevicePathEqual (
|
||||
UINTN Len2;
|
||||
SATA_DEVICE_PATH *SataNode1;
|
||||
SATA_DEVICE_PATH *SataNode2;
|
||||
XBool ForceEqualNodes;
|
||||
XBool ForceEqualNodes;
|
||||
|
||||
|
||||
// DBG_DP (" BootVolumeDevicePathEqual:\n %ls\n %ls\n", FileDevicePathToStr (DevicePath1), FileDevicePathToStr (DevicePath2));
|
||||
@ -1243,7 +1243,7 @@ FindStartupDiskVolume (
|
||||
// LOADER_ENTRY *LoaderEntry;
|
||||
// REFIT_VOLUME *Volume;
|
||||
REFIT_VOLUME *DiskVolume;
|
||||
XBool IsPartitionVolume;
|
||||
XBool IsPartitionVolume;
|
||||
XStringW LoaderPath;
|
||||
XStringW EfiBootVolumeStr;
|
||||
|
||||
|
@ -63,7 +63,7 @@ INTN OldChosenTheme;
|
||||
INTN OldChosenConfig;
|
||||
INTN OldChosenDsdt;
|
||||
UINTN OldChosenAudio;
|
||||
XBool SavePreBootLog;
|
||||
XBool SavePreBootLog;
|
||||
UINT8 DefaultAudioVolume;
|
||||
INTN LayoutBannerOffset = 64;
|
||||
INTN LayoutTextOffset = 0;
|
||||
@ -94,13 +94,13 @@ XStringWArray DsdtsList;
|
||||
XObjArray<HDA_OUTPUTS> AudioList;
|
||||
|
||||
// firmware
|
||||
XBool gFirmwareClover = false;
|
||||
XBool gFirmwareClover = false;
|
||||
UINTN gEvent;
|
||||
UINT16 gBacklightLevel;
|
||||
//XBool defDSM;
|
||||
//UINT16 dropDSM;
|
||||
//UINT16 dropDSM;
|
||||
|
||||
XBool ResumeFromCoreStorage = false;
|
||||
XBool ResumeFromCoreStorage = false;
|
||||
//XBool gRemapSmBiosIsRequire;
|
||||
|
||||
// QPI
|
||||
@ -186,7 +186,7 @@ XString8Array CUSTOM_LOADER_SUBENTRY::getLoadOptions() const
|
||||
return LoadOptions;
|
||||
}
|
||||
|
||||
UINT8 CUSTOM_LOADER_SUBENTRY::getFlags(bool NoCachesDefault) const
|
||||
UINT8 CUSTOM_LOADER_SUBENTRY::getFlags(XBool NoCachesDefault) const
|
||||
{
|
||||
UINT8 Flags = parent.getFlags(NoCachesDefault);
|
||||
if ( settings._Arguments.isDefined() ) Flags = OSFLAG_SET(Flags, OSFLAG_NODEFAULTARGS);
|
||||
@ -226,7 +226,7 @@ const XString8& CUSTOM_LOADER_SUBENTRY::getFullTitle() const {
|
||||
};
|
||||
|
||||
|
||||
bool SETTINGS_DATA::GUIClass::getDarkEmbedded(bool isDaylight) const {
|
||||
XBool SETTINGS_DATA::GUIClass::getDarkEmbedded(XBool isDaylight) const {
|
||||
if ( EmbeddedThemeType.isEqualIC("Dark") ) return true;
|
||||
if ( EmbeddedThemeType.isEqualIC("Daytime") ) return !isDaylight;
|
||||
return false;
|
||||
@ -369,7 +369,7 @@ void afterGetUserSettings(SETTINGS_DATA& settingsData)
|
||||
{
|
||||
ACPI_DROP_TABLE *DropTable = GlobalConfig.ACPIDropTables;
|
||||
DBG(" - [%02zd]: Drop table : %.4s, %16llx : ", idx, (const char*)&settingsData.ACPI.ACPIDropTablesArray[idx].Signature, settingsData.ACPI.ACPIDropTablesArray[idx].TableId);
|
||||
bool Dropped = false;
|
||||
XBool Dropped = false;
|
||||
while (DropTable) {
|
||||
if (((settingsData.ACPI.ACPIDropTablesArray[idx].Signature == DropTable->Signature) &&
|
||||
(!settingsData.ACPI.ACPIDropTablesArray[idx].TableId || (DropTable->TableId == settingsData.ACPI.ACPIDropTablesArray[idx].TableId)) &&
|
||||
@ -943,8 +943,8 @@ SetDevices (LOADER_ENTRY *Entry)
|
||||
UINTN Bus;
|
||||
UINTN Device;
|
||||
UINTN Function;
|
||||
XBool StringDirty = false;
|
||||
XBool TmpDirty = false;
|
||||
XBool StringDirty = false;
|
||||
XBool TmpDirty = false;
|
||||
UINT32 Rcba;
|
||||
UINT32 Hptc;
|
||||
DevPropDevice *device = NULL;
|
||||
@ -1943,11 +1943,11 @@ XStringW GetOSVersionKextsDir(const MacOsVersion& OSVersion)
|
||||
// Do we need that with OC ? For old version ?
|
||||
//EFI_STATUS LOADER_ENTRY::SetFSInjection()
|
||||
//{
|
||||
// EFI_STATUS Status;
|
||||
// EFI_STATUS Status;
|
||||
// FSINJECTION_PROTOCOL *FSInject;
|
||||
// XStringW SrcDir;
|
||||
// //XBool InjectionNeeded = false;
|
||||
// //XBool BlockCaches = false;
|
||||
// //XBool InjectionNeeded = false;
|
||||
// //XBool BlockCaches = false;
|
||||
// FSI_STRING_LIST *Blacklist = 0;
|
||||
// FSI_STRING_LIST *ForceLoadKexts = NULL;
|
||||
//
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -70,7 +70,7 @@ static void SmbiosFillPatchingValues(const SETTINGS_DATA::SmbiosClass::RamSlotIn
|
||||
SmbiosFillPatchingValues(other.User, &Memory._User);
|
||||
}
|
||||
|
||||
void SmbiosFillPatchingValues(bool _SetTable132, uint8_t pEnabledCores, uint16_t pRamSlotCount, const SlotDeviceArrayClass& SlotDeviceArray, const SETTINGS_DATA& globalSettings, const CPU_STRUCTURE& CPUStructure, SmbiosInjectedSettings* smbiosInjectedSettingsPtr)
|
||||
void SmbiosFillPatchingValues(XBool _SetTable132, uint8_t pEnabledCores, uint16_t pRamSlotCount, const SlotDeviceArrayClass& SlotDeviceArray, const SETTINGS_DATA& globalSettings, const CPU_STRUCTURE& CPUStructure, SmbiosInjectedSettings* smbiosInjectedSettingsPtr)
|
||||
{
|
||||
SmbiosInjectedSettings& smbiosInjectedSetting = *smbiosInjectedSettingsPtr;
|
||||
// from CPUStructure
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include "../Platform/Settings.h"
|
||||
#include "../Platform/smbios.h"
|
||||
|
||||
void SmbiosFillPatchingValues(bool _SetTable132, uint8_t pEnabledCores, uint16_t pRamSlotCount, const SlotDeviceArrayClass& SlotDeviceArray, const SETTINGS_DATA& globalSettings, const CPU_STRUCTURE& CPUStructure, SmbiosInjectedSettings* smbiosInjectedSettingsPtr);
|
||||
void SmbiosFillPatchingValues(XBool _SetTable132, uint8_t pEnabledCores, uint16_t pRamSlotCount, const SlotDeviceArrayClass& SlotDeviceArray, const SETTINGS_DATA& globalSettings, const CPU_STRUCTURE& CPUStructure, SmbiosInjectedSettings* smbiosInjectedSettingsPtr);
|
||||
|
||||
|
||||
|
||||
|
@ -35,12 +35,12 @@
|
||||
#define IS_PUNCT(x) ((x == '.') || (x == '-'))
|
||||
#define IS_BLANK(x) ((x == ' ') || (x == '\t'))
|
||||
|
||||
inline bool isPathSeparator(char32_t c) { return c == '/' || c == '\\'; }
|
||||
inline XBool isPathSeparator(char32_t c) { return c == '/' || c == '\\'; }
|
||||
|
||||
|
||||
////void LowCase (IN OUT CHAR8 *Str);
|
||||
//UINT32 hex2bin(IN const CHAR8 *hex, OUT UINT8 *bin, UINT32 len);
|
||||
XBool IsHexDigit (CHAR8 c);
|
||||
XBool IsHexDigit (CHAR8 c);
|
||||
UINT8 hexstrtouint8 (CONST CHAR8* buf); //one or two hex letters to one byte
|
||||
|
||||
|
||||
|
@ -25,9 +25,9 @@ GetRootUUID (IN REFIT_VOLUME *Volume)
|
||||
CONST CHAR16* SystemPlistP;
|
||||
CONST CHAR16* SystemPlistS;
|
||||
|
||||
XBool HasRock;
|
||||
XBool HasPaper;
|
||||
XBool HasScissors;
|
||||
XBool HasRock;
|
||||
XBool HasPaper;
|
||||
XBool HasScissors;
|
||||
|
||||
Status = EFI_NOT_FOUND;
|
||||
if (Volume == NULL) {
|
||||
|
@ -37,11 +37,11 @@ public:
|
||||
XStringW VolLabel = XStringW(); // comes from \\.VolumeLabel.txt, or empty.
|
||||
UINT8 DiskKind = 0;
|
||||
LEGACY_OS *LegacyOS = 0;
|
||||
XBool Hidden = false;
|
||||
XBool Hidden = false;
|
||||
UINT8 BootType = 0;
|
||||
XBool IsAppleLegacy = false;
|
||||
XBool HasBootCode = false;
|
||||
XBool IsMbrPartition = false;
|
||||
XBool IsAppleLegacy = false;
|
||||
XBool HasBootCode = false;
|
||||
XBool IsMbrPartition = false;
|
||||
UINTN MbrPartitionIndex = 0;
|
||||
EFI_BLOCK_IO *BlockIO = 0;
|
||||
UINT64 BlockIOOffset = 0;
|
||||
|
@ -1543,9 +1543,9 @@ void free_val(value_t *val )
|
||||
// {FLAGTRUE, false, "ATY,VendorID", NULL, WRDVAL(0x1002) },
|
||||
/*typedef struct {
|
||||
UINT32 flags;
|
||||
XBool all_ports;
|
||||
XBool all_ports;
|
||||
CHAR8 *name;
|
||||
XBool (*get_value)(value_t *val, INTN index, XBool Sier);
|
||||
XBool (*get_value)(value_t *val, INTN index, XBool Sier);
|
||||
value_t default_val;
|
||||
} AtiDevProp;
|
||||
*/
|
||||
|
@ -245,7 +245,7 @@ typedef struct {
|
||||
const CHAR8 *cfg_name;
|
||||
UINT8 ports;
|
||||
UINT32 flags;
|
||||
XBool posted;
|
||||
XBool posted;
|
||||
} card_t;
|
||||
|
||||
// Chip flags
|
||||
@ -278,9 +278,9 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
UINT32 flags;
|
||||
XBool all_ports;
|
||||
XBool all_ports;
|
||||
CONST CHAR8 *name;
|
||||
XBool (*get_value)(value_t *val, INTN index, XBool Sier);
|
||||
XBool (*get_value)(value_t *val, INTN index, XBool Sier);
|
||||
value_t default_val;
|
||||
} AtiDevProp;
|
||||
|
||||
|
@ -27,7 +27,7 @@ FindCardWithIds (
|
||||
// UINT32 SubId,
|
||||
// UINT64 VideoRam,
|
||||
// UINTN VideoPorts,
|
||||
// XBool LoadVBios
|
||||
// XBool LoadVBios
|
||||
// );
|
||||
|
||||
|
||||
|
@ -1441,7 +1441,7 @@ MACHINE_TYPES GetDefaultModel()
|
||||
return MacPro61;
|
||||
}
|
||||
// TODO: Add more CPU models and configure the correct machines per CPU/GFX model
|
||||
bool isMobile = getMobileFromSmbios();
|
||||
XBool isMobile = getMobileFromSmbios();
|
||||
if(isMobile) {
|
||||
switch (gCPUStructure.Model)
|
||||
{
|
||||
|
@ -276,7 +276,7 @@ XBool devprop_add_value(DevPropDevice *device, CONST CHAR8 *nm, const UINT8 *vl,
|
||||
return true;
|
||||
}
|
||||
|
||||
bool devprop_add_value(DevPropDevice *device, const XString8& nm, const XBuffer<uint8_t>& vl)
|
||||
XBool devprop_add_value(DevPropDevice *device, const XString8& nm, const XBuffer<uint8_t>& vl)
|
||||
{
|
||||
return devprop_add_value(device, nm.data(), vl.data(), vl.size());
|
||||
}
|
||||
@ -350,7 +350,7 @@ XBool set_eth_props(pci_dt_t *eth_dev)
|
||||
#endif
|
||||
DevPropDevice *device = NULL;
|
||||
UINT8 builtin = 0x0;
|
||||
XBool Injected = false;
|
||||
XBool Injected = false;
|
||||
UINTN i;
|
||||
CHAR8 compatible[64];
|
||||
|
||||
@ -437,7 +437,7 @@ XBool set_usb_props(pci_dt_t *usb_dev)
|
||||
#endif
|
||||
DevPropDevice *device = NULL;
|
||||
UINT32 fake_devid;
|
||||
XBool Injected = false;
|
||||
XBool Injected = false;
|
||||
UINTN i;
|
||||
|
||||
if (!device_inject_string)
|
||||
|
@ -122,7 +122,7 @@ DevPropString *devprop_create_string(void);
|
||||
//DevPropDevice *devprop_add_device(DevPropString *string, char *path);
|
||||
DevPropDevice *devprop_add_device_pci(DevPropString *string, pci_dt_t *PciDt, EFI_DEVICE_PATH_PROTOCOL *DevicePath);
|
||||
XBool devprop_add_value(DevPropDevice *device, CONST CHAR8 *nm, const UINT8 *vl, UINTN len); // to be removed
|
||||
bool devprop_add_value(DevPropDevice *device, const XString8& nm, const XBuffer<uint8_t>& vl);
|
||||
XBool devprop_add_value(DevPropDevice *device, const XString8& nm, const XBuffer<uint8_t>& vl);
|
||||
XBuffer<char> devprop_generate_string(DevPropString *string);
|
||||
void devprop_free_string(DevPropString *string);
|
||||
|
||||
|
@ -970,12 +970,12 @@ XBool setup_gma_devprop(const MacOsVersion& macOSVersion, const XString8& BuildV
|
||||
UINT32 FakeID;
|
||||
UINT32 DualLink = 1;
|
||||
// UINT64 os_version = AsciiOSVersionToUint64(macOSVersion);
|
||||
XBool SetUGAWidth = false;
|
||||
XBool SetUGAHeight = false;
|
||||
XBool Injected = false;
|
||||
XBool SetFake = false;
|
||||
XBool SetSnb = false;
|
||||
XBool SetIg = false;
|
||||
XBool SetUGAWidth = false;
|
||||
XBool SetUGAHeight = false;
|
||||
XBool Injected = false;
|
||||
XBool SetFake = false;
|
||||
XBool SetSnb = false;
|
||||
XBool SetIg = false;
|
||||
|
||||
MACHINE_TYPES MacModel = GetModelFromString(gSettings.Smbios.ProductName);
|
||||
|
||||
|
@ -28,7 +28,7 @@ public:
|
||||
|
||||
EFI_GUIDClass(const EFI_GUID& other) { Data1 = other.Data1; Data2 = other.Data2; Data3 = other.Data3; memcpy(Data4, other.Data4, sizeof(Data4)); }
|
||||
|
||||
bool operator == (const EFI_GUID& other) const {
|
||||
XBool operator == (const EFI_GUID& other) const {
|
||||
if ( !(Data1 == other.Data1) ) return false;
|
||||
if ( !(Data2 == other.Data2) ) return false;
|
||||
if ( !(Data3 == other.Data3) ) return false;
|
||||
|
@ -156,7 +156,7 @@ XBool setup_hda_devprop(EFI_PCI_IO_PROTOCOL *PciIo, pci_dt_t *hda_dev, const Mac
|
||||
DevPropDevice *device = NULL;
|
||||
UINT32 layoutId = 0;
|
||||
UINT32 codecId = 0;
|
||||
XBool Injected = false;
|
||||
XBool Injected = false;
|
||||
UINTN i;
|
||||
|
||||
if (!device_inject_string) {
|
||||
|
@ -52,13 +52,13 @@
|
||||
//UINT32 *dtLength;
|
||||
//UINT8 *KernelData = NULL;
|
||||
//UINT32 KernelSlide = 0;
|
||||
//XBool isKernelcache = false;
|
||||
//XBool is64BitKernel = false;
|
||||
//XBool SSSE3;
|
||||
//XBool isKernelcache = false;
|
||||
//XBool is64BitKernel = false;
|
||||
//XBool SSSE3;
|
||||
|
||||
//XBool PatcherInited = false;
|
||||
//XBool gSNBEAICPUFixRequire = false; // SandyBridge-E AppleIntelCpuPowerManagement patch require or not
|
||||
//XBool gBDWEIOPCIFixRequire = false; // Broadwell-E IOPCIFamily fix require or not
|
||||
//XBool PatcherInited = false;
|
||||
//XBool gSNBEAICPUFixRequire = false; // SandyBridge-E AppleIntelCpuPowerManagement patch require or not
|
||||
//XBool gBDWEIOPCIFixRequire = false; // Broadwell-E IOPCIFamily fix require or not
|
||||
|
||||
extern EFI_GUID gEfiAppleBootGuid;
|
||||
|
||||
@ -224,7 +224,7 @@ UINTN LOADER_ENTRY::searchProcInDriver(UINT8 * driver, UINT32 driverLen, const X
|
||||
}
|
||||
INT32 i;
|
||||
UINT32 Offset = 0; // Init to avoid warning
|
||||
bool found = false;
|
||||
XBool found = false;
|
||||
for (i = 0; i < lSizeVtable; ++i) {
|
||||
Offset = vArray[i].n_un.n_strx;
|
||||
if (strstr(&Names[Offset], procedure.c_str())) {
|
||||
@ -334,7 +334,7 @@ UINTN LOADER_ENTRY::searchProc(const XString8& procedure)
|
||||
//search for the name
|
||||
// gBS->Stall(9000000);
|
||||
size_t i;
|
||||
bool found = false;
|
||||
XBool found = false;
|
||||
for (i=0; i<SizeVtable; ++i) {
|
||||
size_t Offset = vArray[i].NameOffset;
|
||||
if (Offset == 0) break;
|
||||
@ -2372,7 +2372,7 @@ LOADER_ENTRY::KernelUserPatch()
|
||||
}
|
||||
// if we modify directly KernelAndKextPatches.KernelPatches[i].SearchLen, it will wrong for next driver
|
||||
UINTN SearchLen = KernelAndKextPatches.KernelPatches[i].SearchLen;
|
||||
bool once = false;
|
||||
XBool once = false;
|
||||
UINTN procLen = 0;
|
||||
UINTN procAddr = searchProc(KernelAndKextPatches.KernelPatches[i].ProcedureName);
|
||||
DBG("procedure %s found at 0x%llx\n", KernelAndKextPatches.KernelPatches[i].ProcedureName.c_str(), procAddr);
|
||||
|
@ -138,16 +138,16 @@ typedef struct SEGMENT {
|
||||
//extern UINT32 *dtLength;
|
||||
//extern UINT8 *KernelData;
|
||||
//extern UINT32 KernelSlide;
|
||||
//extern XBool isKernelcache;
|
||||
//extern XBool is64BitKernel;
|
||||
//extern XBool gSNBEAICPUFixRequire; // SandyBridge-E AppleIntelCpuPowerManagement patch require or not
|
||||
//extern XBool gBDWEIOPCIFixRequire; // Broadwell-E IOPCIFamily fix require or not
|
||||
//extern XBool isKernelcache;
|
||||
//extern XBool is64BitKernel;
|
||||
//extern XBool gSNBEAICPUFixRequire; // SandyBridge-E AppleIntelCpuPowerManagement patch require or not
|
||||
//extern XBool gBDWEIOPCIFixRequire; // Broadwell-E IOPCIFamily fix require or not
|
||||
|
||||
|
||||
//extern UINT32 DisplayVendor[];
|
||||
//void findCPUfamily();
|
||||
|
||||
//extern XBool SSSE3;
|
||||
//extern XBool SSSE3;
|
||||
|
||||
|
||||
//UINT64 kernelsize;
|
||||
|
@ -213,11 +213,11 @@ EFI_STATUS LOADER_ENTRY::LoadKext(const EFI_FILE *RootDir, const XString8& FileN
|
||||
UINTN executableBufferLength = 0;
|
||||
// CHAR8* bundlePathBuffer = NULL;
|
||||
// UINTN bundlePathBufferLength = 0;
|
||||
XStringW TempName;
|
||||
TagDict* dict = NULL;
|
||||
XStringW TempName;
|
||||
TagDict* dict = NULL;
|
||||
const TagStruct* prop = NULL;
|
||||
XBool NoContents = false;
|
||||
XBool inject = false;
|
||||
XBool NoContents = false;
|
||||
XBool inject = false;
|
||||
_BooterKextFileInfo *infoAddr = NULL;
|
||||
_DeviceTreeBuffer *kext = (_DeviceTreeBuffer *)kext_v;
|
||||
|
||||
|
@ -146,7 +146,7 @@ void ExtractKextBundleIdentifier(CHAR8 *Plist)
|
||||
XBool
|
||||
isPatchNameMatch (CHAR8 *BundleIdentifier, CHAR8 *Name)
|
||||
{
|
||||
XBool isBundle = (AsciiStrStr(Name, ".") != NULL);
|
||||
XBool isBundle = (AsciiStrStr(Name, ".") != NULL);
|
||||
return
|
||||
isBundle
|
||||
? (AsciiStrCmp(BundleIdentifier, Name) == 0)
|
||||
@ -957,7 +957,7 @@ void LOADER_ENTRY::AnyKextPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPli
|
||||
if (!kextpatch.IsPlistPatch) {
|
||||
// kext binary patch
|
||||
DBG_RT("Binary patch\n");
|
||||
bool once = false;
|
||||
XBool once = false;
|
||||
UINTN procLen = 0;
|
||||
UINTN procAddr = searchProcInDriver(Driver, DriverSize, kextpatch.ProcedureName);
|
||||
|
||||
@ -1122,7 +1122,7 @@ void LOADER_ENTRY::PatchKext(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist,
|
||||
|
||||
for (size_t i = 0; i < KernelAndKextPatches.KextPatches.size(); i++) {
|
||||
XString8& Name = KernelAndKextPatches.KextPatches[i].Name;
|
||||
XBool isBundle = Name.contains(".");
|
||||
XBool isBundle = Name.contains(".");
|
||||
if ((KernelAndKextPatches.KextPatches[i].Find.size() > 0) &&
|
||||
isBundle?(AsciiStrCmp(gKextBundleIdentifier, Name.c_str()) == 0):(AsciiStrStr(gKextBundleIdentifier, Name.c_str()) != NULL)) {
|
||||
// (AsciiStrStr(InfoPlist, KernelAndKextPatches.KextPatches[i].Name) != NULL)) {
|
||||
|
@ -2177,8 +2177,8 @@ XBool setup_nvidia_devprop(pci_dt_t *nvda_dev)
|
||||
EFI_STATUS Status = EFI_NOT_FOUND;
|
||||
DevPropDevice *device = NULL;
|
||||
XString8 devicepath;
|
||||
XBool load_vbios = gSettings.Graphics.LoadVBios;
|
||||
XBool Injected = false;
|
||||
XBool load_vbios = gSettings.Graphics.LoadVBios;
|
||||
XBool Injected = false;
|
||||
UINT8 *rom = NULL;
|
||||
UINT16 nvCardType = 0;
|
||||
UINT64 videoRam = 0;
|
||||
@ -2194,7 +2194,7 @@ XBool setup_nvidia_devprop(pci_dt_t *nvda_dev)
|
||||
INT32 crlf_count = 0;
|
||||
option_rom_pci_header_t *rom_pci_header;
|
||||
XString8 version_str;
|
||||
XBool RomAssigned = false;
|
||||
XBool RomAssigned = false;
|
||||
UINT32 device_id, subsys_id;
|
||||
const SETTINGS_DATA::GraphicsClass::GRAPHIC_CARD *nvcard;
|
||||
|
||||
|
@ -757,7 +757,7 @@ uint64_t GetExtFwFeaturesMask(MACHINE_TYPES Model)
|
||||
return (uint64_t)GetFwFeaturesMaskFromModel(Model) + 0xFF00000000ull;
|
||||
}
|
||||
|
||||
bool GetMobile(MACHINE_TYPES Model)
|
||||
XBool GetMobile(MACHINE_TYPES Model)
|
||||
{
|
||||
// Mobile: the battery tab in Energy Saver
|
||||
switch ( Model )
|
||||
@ -988,7 +988,7 @@ UINT64 GetPlatformFeature(MACHINE_TYPES Model)
|
||||
}
|
||||
}
|
||||
|
||||
void getRBr(MACHINE_TYPES Model, UINT32 CPUModel, bool isMobile, char RBr[8])
|
||||
void getRBr(MACHINE_TYPES Model, UINT32 CPUModel, XBool isMobile, char RBr[8])
|
||||
{
|
||||
memset(RBr, 0, 8);
|
||||
if (ApplePlatformData[Model].smcBranch[0] != 'N') {
|
||||
@ -1066,7 +1066,7 @@ void getRBr(MACHINE_TYPES Model, UINT32 CPUModel, bool isMobile, char RBr[8])
|
||||
}
|
||||
}
|
||||
|
||||
void getRPlt(MACHINE_TYPES Model, UINT32 CPUModel, bool isMobile, char RPlt[8])
|
||||
void getRPlt(MACHINE_TYPES Model, UINT32 CPUModel, XBool isMobile, char RPlt[8])
|
||||
{
|
||||
memset(RPlt, 0, 8);
|
||||
if (ApplePlatformData[Model].smcPlatform[0] != 'N') {
|
||||
@ -1142,7 +1142,7 @@ void getRPlt(MACHINE_TYPES Model, UINT32 CPUModel, bool isMobile, char RPlt[8])
|
||||
}
|
||||
}
|
||||
|
||||
bool isReleaseDateWithYear20(MACHINE_TYPES Model)
|
||||
XBool isReleaseDateWithYear20(MACHINE_TYPES Model)
|
||||
{
|
||||
switch ( Model )
|
||||
{
|
||||
@ -1598,11 +1598,11 @@ int compareBiosVersion(const XString8& version1, const XString8& version2)
|
||||
}
|
||||
}
|
||||
|
||||
bool is2ndBiosVersionGreaterThan1st(const XString8& version1, const XString8& version2)
|
||||
XBool is2ndBiosVersionGreaterThan1st(const XString8& version1, const XString8& version2)
|
||||
{
|
||||
return compareBiosVersion(version1, version2) <= 0;
|
||||
}
|
||||
bool isBiosVersionEquel(const XString8& version1, const XString8& version2)
|
||||
XBool isBiosVersionEquel(const XString8& version1, const XString8& version2)
|
||||
{
|
||||
return compareBiosVersion(version1, version2) == 0;
|
||||
}
|
||||
|
@ -196,21 +196,21 @@ extern PLATFORMDATA ApplePlatformData[];
|
||||
void SetDMISettingsForModel(MACHINE_TYPES Model, SETTINGS_DATA* settingsData, REFIT_CONFIG* liveConfig);
|
||||
MACHINE_TYPES GetModelFromString (const XString8& ProductName);
|
||||
|
||||
bool isReleaseDateWithYear20(MACHINE_TYPES Model);
|
||||
XBool isReleaseDateWithYear20(MACHINE_TYPES Model);
|
||||
XString8 GetReleaseDate (MACHINE_TYPES Model);
|
||||
uint8_t GetChassisTypeFromModel(MACHINE_TYPES Model);
|
||||
uint32_t GetFwFeaturesMaskFromModel(MACHINE_TYPES Model);
|
||||
uint32_t GetFwFeatures(MACHINE_TYPES Model);
|
||||
uint64_t GetExtFwFeatures(MACHINE_TYPES Model);
|
||||
uint64_t GetExtFwFeaturesMask(MACHINE_TYPES Model);
|
||||
bool GetMobile(MACHINE_TYPES Model);
|
||||
XBool GetMobile(MACHINE_TYPES Model);
|
||||
UINT64 GetPlatformFeature(MACHINE_TYPES Model);
|
||||
void getRBr(MACHINE_TYPES Model, UINT32 CPUModel, bool isMobile, char RBr[8]);
|
||||
void getRPlt(MACHINE_TYPES Model, UINT32 CPUModel, bool isMobile, char RPlt[8]);
|
||||
void getRBr(MACHINE_TYPES Model, UINT32 CPUModel, XBool isMobile, char RBr[8]);
|
||||
void getRPlt(MACHINE_TYPES Model, UINT32 CPUModel, XBool isMobile, char RPlt[8]);
|
||||
|
||||
int compareBiosVersion(const XString8& version1, const XString8& version2);
|
||||
bool is2ndBiosVersionGreaterThan1st(const XString8& version1, const XString8& version2);
|
||||
bool isBiosVersionEquel(const XString8& version1, const XString8& version2);
|
||||
XBool is2ndBiosVersionGreaterThan1st(const XString8& version1, const XString8& version2);
|
||||
XBool isBiosVersionEquel(const XString8& version1, const XString8& version2);
|
||||
|
||||
int compareReleaseDate(const XString8& date1, const XString8& date2);
|
||||
|
||||
|
@ -46,7 +46,7 @@
|
||||
|
||||
XObjArray<TagArray> TagArray::tagsFree;
|
||||
|
||||
bool TagArray::operator == (const TagStruct& other) const
|
||||
XBool TagArray::operator == (const TagStruct& other) const
|
||||
{
|
||||
if ( !other.isArray() ) return false;
|
||||
if ( _arrayContent.size() != other.getArray()->arrayContent().size() ) {
|
||||
@ -60,7 +60,7 @@ bool TagArray::operator == (const TagStruct& other) const
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TagArray::debugIsEqual(const TagStruct& other, const XString8& label) const
|
||||
XBool TagArray::debugIsEqual(const TagStruct& other, const XString8& label) const
|
||||
{
|
||||
if ( !other.isArray() ) {
|
||||
MsgLog("counterpart of '%s' is not an array\n", label.c_str());
|
||||
|
@ -22,13 +22,13 @@ public:
|
||||
const TagArray& operator = (const TagArray&); // Can be defined if needed
|
||||
virtual ~TagArray() { }
|
||||
|
||||
virtual bool operator == (const TagStruct& other) const;
|
||||
virtual bool debugIsEqual(const TagStruct& other, const XString8& label) const;
|
||||
virtual XBool operator == (const TagStruct& other) const;
|
||||
virtual XBool debugIsEqual(const TagStruct& other, const XString8& label) const;
|
||||
|
||||
virtual TagArray* getArray() { return this; }
|
||||
virtual const TagArray* getArray() const { return this; }
|
||||
|
||||
virtual bool isArray() const { return true; }
|
||||
virtual XBool isArray() const { return true; }
|
||||
virtual const XString8 getTypeAsXString8() const { return "Array"_XS8; }
|
||||
static TagArray* getEmptyTag();
|
||||
virtual void FreeTag();
|
||||
|
@ -71,7 +71,7 @@ void TagBool::FreeTag()
|
||||
tagsFree.AddReference(this, true);
|
||||
}
|
||||
|
||||
bool TagBool::operator == (const TagStruct& other) const
|
||||
XBool TagBool::operator == (const TagStruct& other) const
|
||||
{
|
||||
if ( !other.isBool() ) return false;
|
||||
return value == other.getBool()->value;
|
||||
|
@ -13,7 +13,7 @@
|
||||
class TagBool : public TagStruct
|
||||
{
|
||||
static XObjArray<TagBool> tagsFree;
|
||||
bool value;
|
||||
XBool value;
|
||||
|
||||
public:
|
||||
|
||||
@ -22,12 +22,12 @@ public:
|
||||
const TagBool& operator = (const TagBool&); // Can be defined if needed
|
||||
virtual ~TagBool() { }
|
||||
|
||||
virtual bool operator == (const TagStruct& other) const;
|
||||
virtual XBool operator == (const TagStruct& other) const;
|
||||
|
||||
virtual TagBool* getBool() { return this; }
|
||||
virtual const TagBool* getBool() const { return this; }
|
||||
|
||||
virtual bool isBool() const { return true; }
|
||||
virtual XBool isBool() const { return true; }
|
||||
virtual const XString8 getTypeAsXString8() const { return "Bool"_XS8; }
|
||||
static TagBool* getEmptyTag();
|
||||
virtual void FreeTag();
|
||||
@ -37,14 +37,14 @@ public:
|
||||
/*
|
||||
* getters and setters
|
||||
*/
|
||||
bool boolValue() const
|
||||
XBool boolValue() const
|
||||
{
|
||||
// if ( !isBool() ) panic("TagBool::boolValue() : !isBool() ");
|
||||
return value;
|
||||
}
|
||||
void setBoolValue(bool b)
|
||||
void setBoolValue(XBool b)
|
||||
{
|
||||
// if ( !isBool() ) panic("TagBool::setIntValue(bool) : !isBool() ");
|
||||
// if ( !isBool() ) panic("TagBool::setIntValue(XBool) : !isBool() ");
|
||||
value = b;
|
||||
}
|
||||
|
||||
|
@ -73,7 +73,7 @@ void TagData::FreeTag()
|
||||
tagsFree.AddReference(this, true);
|
||||
}
|
||||
|
||||
bool TagData::operator == (const TagStruct& other) const
|
||||
XBool TagData::operator == (const TagStruct& other) const
|
||||
{
|
||||
if ( !other.isData() ) return false;
|
||||
if ( dataBuffer != other.getData()->dataBuffer ) return false;
|
||||
|
@ -23,12 +23,12 @@ public:
|
||||
const TagData& operator = (const TagData&); // Can be defined if needed
|
||||
virtual ~TagData() { }
|
||||
|
||||
virtual bool operator == (const TagStruct& other) const;
|
||||
virtual XBool operator == (const TagStruct& other) const;
|
||||
|
||||
virtual TagData* getData() { return this; }
|
||||
virtual const TagData* getData() const { return this; }
|
||||
|
||||
virtual bool isData() const { return true; }
|
||||
virtual XBool isData() const { return true; }
|
||||
virtual const XString8 getTypeAsXString8() const { return "Data"_XS8; }
|
||||
static TagData* getEmptyTag();
|
||||
virtual void FreeTag();
|
||||
|
@ -72,7 +72,7 @@ void TagDate::FreeTag()
|
||||
tagsFree.AddReference(this, true);
|
||||
}
|
||||
|
||||
bool TagDate::operator == (const TagStruct& other) const
|
||||
XBool TagDate::operator == (const TagStruct& other) const
|
||||
{
|
||||
if ( !other.isDate() ) return false;
|
||||
return string == other.getDate()->string;
|
||||
|
@ -22,12 +22,12 @@ public:
|
||||
const TagDate& operator = (const TagDate&); // Can be defined if needed
|
||||
virtual ~TagDate() { }
|
||||
|
||||
virtual bool operator == (const TagStruct& other) const;
|
||||
virtual XBool operator == (const TagStruct& other) const;
|
||||
|
||||
virtual TagDate* getDate() { return this; }
|
||||
virtual const TagDate* getDate() const { return this; }
|
||||
|
||||
virtual bool isDict() const { return true; }
|
||||
virtual XBool isDict() const { return true; }
|
||||
virtual const XString8 getTypeAsXString8() const { return "Dict"_XS8; }
|
||||
static TagDate* getEmptyTag();
|
||||
virtual void FreeTag();
|
||||
|
@ -75,7 +75,7 @@ void TagDict::FreeTag()
|
||||
tagsFree.AddReference(this, true);
|
||||
}
|
||||
|
||||
bool TagDict::operator == (const TagStruct& other) const
|
||||
XBool TagDict::operator == (const TagStruct& other) const
|
||||
{
|
||||
if ( !other.isDict() ) return false;
|
||||
if ( _dictContent.size() != other.getDict()->_dictContent.size() ) {
|
||||
@ -89,7 +89,7 @@ bool TagDict::operator == (const TagStruct& other) const
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TagDict::debugIsEqual(const TagStruct& other, const XString8& label) const
|
||||
XBool TagDict::debugIsEqual(const TagStruct& other, const XString8& label) const
|
||||
{
|
||||
if ( !other.isDict()) {
|
||||
MsgLog("counterpart of '%s' is not a dict\n", label.c_str());
|
||||
|
@ -22,13 +22,13 @@ public:
|
||||
const TagDict& operator = (const TagDict&); // Can be defined if needed
|
||||
virtual ~TagDict() { }
|
||||
|
||||
virtual bool operator == (const TagStruct& other) const;
|
||||
virtual bool debugIsEqual(const TagStruct& other, const XString8& label) const;
|
||||
virtual XBool operator == (const TagStruct& other) const;
|
||||
virtual XBool debugIsEqual(const TagStruct& other, const XString8& label) const;
|
||||
|
||||
virtual TagDict* getDict() { return this; }
|
||||
virtual const TagDict* getDict() const { return this; }
|
||||
|
||||
virtual bool isDict() const { return true; }
|
||||
virtual XBool isDict() const { return true; }
|
||||
virtual const XString8 getTypeAsXString8() const { return "Dict"_XS8; }
|
||||
static TagDict* getEmptyTag();
|
||||
virtual void FreeTag();
|
||||
|
@ -73,7 +73,7 @@ void TagFloat::FreeTag()
|
||||
tagsFree.AddReference(this, true);
|
||||
}
|
||||
|
||||
bool TagFloat::operator == (const TagStruct& other) const
|
||||
XBool TagFloat::operator == (const TagStruct& other) const
|
||||
{
|
||||
if ( !other.isFloat() ) return false;
|
||||
return value == other.getFloat()->value;
|
||||
|
@ -22,12 +22,12 @@ public:
|
||||
const TagFloat& operator = (const TagFloat&); // Can be defined if needed
|
||||
virtual ~TagFloat() { }
|
||||
|
||||
virtual bool operator == (const TagStruct& other) const;
|
||||
virtual XBool operator == (const TagStruct& other) const;
|
||||
|
||||
virtual TagFloat* getFloat() { return this; }
|
||||
virtual const TagFloat* getFloat() const { return this; }
|
||||
|
||||
virtual bool isFloat() const { return true; }
|
||||
virtual XBool isFloat() const { return true; }
|
||||
virtual const XString8 getTypeAsXString8() const { return "Float"_XS8; }
|
||||
static TagFloat* getEmptyTag();
|
||||
virtual void FreeTag();
|
||||
|
@ -73,7 +73,7 @@ void TagInt64::FreeTag()
|
||||
tagsFree.AddReference(this, true);
|
||||
}
|
||||
|
||||
bool TagInt64::operator == (const TagStruct& other) const
|
||||
XBool TagInt64::operator == (const TagStruct& other) const
|
||||
{
|
||||
if ( !other.isInt64() ) return false;
|
||||
return value == other.getInt64()->value;
|
||||
|
@ -22,12 +22,12 @@ public:
|
||||
const TagInt64& operator = (const TagInt64&); // Can be defined if needed
|
||||
virtual ~TagInt64() { }
|
||||
|
||||
virtual bool operator == (const TagStruct& other) const;
|
||||
virtual XBool operator == (const TagStruct& other) const;
|
||||
|
||||
virtual TagInt64* getInt64() { return this; }
|
||||
virtual const TagInt64* getInt64() const { return this; }
|
||||
|
||||
virtual bool isInt64() const { return true; }
|
||||
virtual XBool isInt64() const { return true; }
|
||||
virtual const XString8 getTypeAsXString8() const { return "Int64"_XS8; }
|
||||
static TagInt64* getEmptyTag();
|
||||
virtual void FreeTag();
|
||||
|
@ -73,7 +73,7 @@ void TagKey::FreeTag()
|
||||
tagsFree.AddReference(this, true);
|
||||
}
|
||||
|
||||
bool TagKey::operator == (const TagStruct& other) const
|
||||
XBool TagKey::operator == (const TagStruct& other) const
|
||||
{
|
||||
if ( !other.isKey() ) return false;
|
||||
return _string == other.getKey()->_string;
|
||||
|
@ -22,12 +22,12 @@ public:
|
||||
const TagKey& operator = (const TagKey&); // Can be defined if needed
|
||||
virtual ~TagKey() { }
|
||||
|
||||
virtual bool operator == (const TagStruct& other) const;
|
||||
virtual XBool operator == (const TagStruct& other) const;
|
||||
|
||||
virtual TagKey* getKey() { return this; }
|
||||
virtual const TagKey* getKey() const { return this; }
|
||||
|
||||
virtual bool isKey() const { return true; }
|
||||
virtual XBool isKey() const { return true; }
|
||||
virtual const XString8 getTypeAsXString8() const { return "Key"_XS8; }
|
||||
static TagKey* getEmptyTag();
|
||||
virtual void FreeTag();
|
||||
|
@ -72,7 +72,7 @@ void TagString::FreeTag()
|
||||
tagsFree.AddReference(this, true);
|
||||
}
|
||||
|
||||
bool TagString::operator == (const TagStruct& other) const
|
||||
XBool TagString::operator == (const TagStruct& other) const
|
||||
{
|
||||
if ( !other.isString() ) return false;
|
||||
return _string == other.getString()->_string;
|
||||
|
@ -22,12 +22,12 @@ public:
|
||||
const TagString& operator = (const TagString&); // Can be defined if needed
|
||||
virtual ~TagString() { }
|
||||
|
||||
virtual bool operator == (const TagStruct& other) const;
|
||||
virtual XBool operator == (const TagStruct& other) const;
|
||||
|
||||
virtual TagString* getString() { return this; }
|
||||
virtual const TagString* getString() const { return this; }
|
||||
|
||||
virtual bool isString() const { return true; }
|
||||
virtual XBool isString() const { return true; }
|
||||
virtual const XString8 getTypeAsXString8() const { return "String8"_XS8; }
|
||||
static TagString* getEmptyTag();
|
||||
virtual void FreeTag();
|
||||
|
@ -57,7 +57,7 @@ EFI_STATUS ParseTagInteger(CHAR8* buffer, TagStruct* * tag, UINT32* lenPtr);
|
||||
EFI_STATUS ParseTagFloat(CHAR8* buffer, TagStruct* * tag, UINT32* lenPtr);
|
||||
EFI_STATUS ParseTagData(CHAR8* buffer, TagStruct* * tag, UINT32* lenPtr);
|
||||
EFI_STATUS ParseTagDate(CHAR8* buffer, TagStruct* * tag, UINT32* lenPtr);
|
||||
EFI_STATUS ParseTagBoolean(TagStruct* * tag, bool value, UINT32* lenPtr);
|
||||
EFI_STATUS ParseTagBoolean(TagStruct* * tag, XBool value, UINT32* lenPtr);
|
||||
|
||||
EFI_STATUS XMLParseNextTag (CHAR8 *buffer, TagStruct**tag, UINT32 *lenPtr);
|
||||
|
||||
@ -165,7 +165,7 @@ EFI_STATUS FixDataMatchingTag( CHAR8* buffer, CONST CHAR8* tag,UINT32* lenPtr);
|
||||
//}
|
||||
//
|
||||
|
||||
bool TagStruct::debugIsEqual(const TagStruct& other, const XString8& label) const
|
||||
XBool TagStruct::debugIsEqual(const TagStruct& other, const XString8& label) const
|
||||
{
|
||||
if ( *this != other ) {
|
||||
MsgLog("Difference at %s\n", label.c_str());
|
||||
@ -184,29 +184,29 @@ void TagStruct::printf(unsigned int ident) const
|
||||
}
|
||||
|
||||
// Convenience method
|
||||
bool TagStruct::isTrue() const
|
||||
XBool TagStruct::isTrue() const
|
||||
{
|
||||
if ( isBool() ) return getBool()->boolValue();
|
||||
return false;
|
||||
}
|
||||
bool TagStruct::isFalse() const
|
||||
XBool TagStruct::isFalse() const
|
||||
{
|
||||
if ( isBool() ) return !getBool()->boolValue();
|
||||
return false;
|
||||
}
|
||||
bool TagStruct::isTrueOrYy() const
|
||||
XBool TagStruct::isTrueOrYy() const
|
||||
{
|
||||
if ( isBool() ) return getBool()->boolValue();
|
||||
if ( isString() && getString()->stringValue().notEmpty() && (getString()->stringValue()[0] == 'y' || getString()->stringValue()[0] == 'Y') ) return true;
|
||||
return false;
|
||||
}
|
||||
bool TagStruct::isTrueOrYes() const
|
||||
XBool TagStruct::isTrueOrYes() const
|
||||
{
|
||||
if ( isBool() ) return getBool()->boolValue();
|
||||
if ( isString() && getString()->stringValue().isEqual("Yes"_XS8) ) return true;
|
||||
return false;
|
||||
}
|
||||
bool TagStruct::isFalseOrNn() const
|
||||
XBool TagStruct::isFalseOrNn() const
|
||||
{
|
||||
if ( isBool() ) return !getBool()->boolValue();
|
||||
if ( isString() && getString()->stringValue().notEmpty() && (getString()->stringValue()[0] == 'n' || getString()->stringValue()[0] == 'N') ) return true;
|
||||
@ -426,7 +426,7 @@ EFI_STATUS XMLParseNextTag(CHAR8* buffer, TagStruct** tag, UINT32* lenPtr)
|
||||
//==========================================================================
|
||||
// ParseTagList
|
||||
|
||||
EFI_STATUS __ParseTagList(bool isArray, CHAR8* buffer, TagStruct** tag, UINT32 empty, UINT32* lenPtr)
|
||||
EFI_STATUS __ParseTagList(XBool isArray, CHAR8* buffer, TagStruct** tag, UINT32 empty, UINT32* lenPtr)
|
||||
{
|
||||
EFI_STATUS Status = EFI_SUCCESS;
|
||||
UINT32 pos;
|
||||
@ -558,7 +558,7 @@ EFI_STATUS ParseTagInteger(CHAR8* buffer, TagStruct** tag, UINT32* lenPtr)
|
||||
UINT32 length = 0;
|
||||
INTN integer;
|
||||
UINT32 size;
|
||||
XBool negative = false;
|
||||
XBool negative = false;
|
||||
CHAR8* val = buffer;
|
||||
TagInt64* tmpTag;
|
||||
|
||||
@ -711,7 +711,7 @@ EFI_STATUS ParseTagDate(CHAR8* buffer, TagStruct* * tag,UINT32* lenPtr)
|
||||
//==========================================================================
|
||||
// ParseTagBoolean
|
||||
|
||||
EFI_STATUS ParseTagBoolean(TagStruct** tag, bool value, UINT32* lenPtr)
|
||||
EFI_STATUS ParseTagBoolean(TagStruct** tag, XBool value, UINT32* lenPtr)
|
||||
{
|
||||
TagBool* tmpTag;
|
||||
|
||||
|
@ -50,9 +50,9 @@ public:
|
||||
// static TagStruct* getEmptyArrayTag();
|
||||
virtual void FreeTag() = 0;
|
||||
|
||||
virtual bool operator == (const TagStruct& other) const = 0;
|
||||
virtual bool operator != (const TagStruct& other) const { return !(*this == other); };
|
||||
virtual bool debugIsEqual(const TagStruct& other, const XString8& label) const;
|
||||
virtual XBool operator == (const TagStruct& other) const = 0;
|
||||
virtual XBool operator != (const TagStruct& other) const { return !(*this == other); };
|
||||
virtual XBool debugIsEqual(const TagStruct& other, const XString8& label) const;
|
||||
|
||||
virtual void sprintf(unsigned int ident, XString8* s) const = 0;
|
||||
void printf(unsigned int ident) const;
|
||||
@ -100,25 +100,25 @@ public:
|
||||
|
||||
#endif
|
||||
|
||||
virtual bool isDict() const { return false; }
|
||||
virtual bool isKey() const { return false; }
|
||||
virtual bool isString() const { return false; }
|
||||
virtual bool isInt64() const { return false; }
|
||||
virtual bool isFloat() const { return false; }
|
||||
virtual bool isBool() const { return false; }
|
||||
virtual bool isData() const { return false; }
|
||||
virtual bool isDate() const { return false; }
|
||||
virtual bool isArray() const { return false; }
|
||||
virtual XBool isDict() const { return false; }
|
||||
virtual XBool isKey() const { return false; }
|
||||
virtual XBool isString() const { return false; }
|
||||
virtual XBool isInt64() const { return false; }
|
||||
virtual XBool isFloat() const { return false; }
|
||||
virtual XBool isBool() const { return false; }
|
||||
virtual XBool isData() const { return false; }
|
||||
virtual XBool isDate() const { return false; }
|
||||
virtual XBool isArray() const { return false; }
|
||||
|
||||
virtual const XString8 getTypeAsXString8() const = 0;
|
||||
|
||||
|
||||
// Convenience method
|
||||
bool isTrue() const;
|
||||
bool isFalse() const;
|
||||
bool isTrueOrYy() const;
|
||||
bool isTrueOrYes() const;
|
||||
bool isFalseOrNn() const;
|
||||
XBool isTrue() const;
|
||||
XBool isFalse() const;
|
||||
XBool isTrueOrYy() const;
|
||||
XBool isTrueOrYes() const;
|
||||
XBool isFalseOrNn() const;
|
||||
};
|
||||
|
||||
#include "TagDict.h"
|
||||
|
@ -94,9 +94,9 @@ UINT16 mHandle19;
|
||||
UINT16 mMemory17[MAX_RAM_SLOTS];
|
||||
UINT64 mInstalled[MAX_RAM_SLOTS];
|
||||
UINT64 mEnabled[MAX_RAM_SLOTS];
|
||||
XBool gMobile;
|
||||
XBool gMobile;
|
||||
UINT8 gBootStatus;
|
||||
XBool Once;
|
||||
XBool Once;
|
||||
|
||||
MEM_STRUCTURE gRAM;
|
||||
|
||||
@ -664,7 +664,7 @@ DBG("%s : UpdateSmbiosString Version=BoardVersion=%s\n", __PRETTY_FUNCTION__, sm
|
||||
return;
|
||||
}
|
||||
|
||||
bool getMobileFromSmbios()
|
||||
XBool getMobileFromSmbios()
|
||||
{
|
||||
// System Chassis Information
|
||||
//
|
||||
@ -1123,7 +1123,7 @@ void PatchTableType9(const SmbiosInjectedSettings& smbiosSettings)
|
||||
DBG("SlotDevice[%hhu].SlotID = %hhd\n", Index, smbiosSettings.SlotDevices.getSlotForIndex(Index).SlotID);
|
||||
DBG("SlotDevice[%hhu].SlotType = %d\n", Index, smbiosSettings.SlotDevices.getSlotForIndex(Index).SlotType);
|
||||
DBG("SlotDevice[%hhu].SlotName = %s\n", Index, smbiosSettings.SlotDevices.getSlotForIndex(Index).SlotName.c_str());
|
||||
DBG("SlotDevice[%hhu].Valid = %d\n", Index, smbiosSettings.SlotDevices.isSlotForIndexValid(Index));
|
||||
DBG("SlotDevice[%hhu].Valid = %d\n", Index, (bool)smbiosSettings.SlotDevices.isSlotForIndexValid(Index));
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1441,7 +1441,7 @@ DBG("gSettings.Smbios.Memory.SlotCounts=%d\n", smbiosSettings.Memory.SlotCounts)
|
||||
DBG("gSettings.Smbios.Memory.UserChannels=%d\n", smbiosSettings.Memory.UserChannels);
|
||||
for (uint64_t Index = 0; Index < smbiosSettings.Memory.SlotCounts; Index++) {
|
||||
DBG("gSettings.Smbios.Memory.User[%lld].Frequency=%d\n", Index, smbiosSettings.Memory.getSlotInfoForSlotID(Index).Frequency);
|
||||
DBG("gSettings.Smbios.Memory.User[%lld].InUse=%d\n", Index, smbiosSettings.Memory.getSlotInfoForSlotID(Index).InUse);
|
||||
DBG("gSettings.Smbios.Memory.User[%lld].InUse=%d\n", Index, (bool)smbiosSettings.Memory.getSlotInfoForSlotID(Index).InUse);
|
||||
DBG("gSettings.Smbios.Memory.User[%lld].ModuleSize=%d\n", Index, smbiosSettings.Memory.getSlotInfoForSlotID(Index).ModuleSize);
|
||||
DBG("gSettings.Smbios.Memory.User[%lld].PartNo=%s\n", Index, smbiosSettings.Memory.getSlotInfoForSlotID(Index).PartNo.c_str());
|
||||
DBG("gSettings.Smbios.Memory.User[%lld].SerialNo=%s\n", Index, smbiosSettings.Memory.getSlotInfoForSlotID(Index).SerialNo.c_str());
|
||||
|
@ -25,14 +25,14 @@ static_assert(MAX_RAM_SLOTS < UINT8_MAX, "MAX_RAM_SLOTS < UINT8_MAX"); // Import
|
||||
|
||||
class RAM_SLOT_INFO {
|
||||
public:
|
||||
UINT64 Slot = UINT64();
|
||||
UINT32 ModuleSize = UINT32();
|
||||
UINT32 Frequency = UINT32();
|
||||
UINT64 Slot = UINT64();
|
||||
UINT32 ModuleSize = UINT32();
|
||||
UINT32 Frequency = UINT32();
|
||||
XString8 Vendor = XString8();
|
||||
XString8 PartNo = XString8();
|
||||
XString8 SerialNo = XString8();
|
||||
UINT8 Type = UINT8();
|
||||
bool InUse = bool();
|
||||
UINT8 Type = UINT8();
|
||||
XBool InUse = false;
|
||||
|
||||
RAM_SLOT_INFO() {}
|
||||
};
|
||||
@ -151,19 +151,19 @@ class SmbiosInjectedSettings
|
||||
XString8 ChassisAssetTag = XString8();
|
||||
XString8 FamilyName = XString8();
|
||||
XString8 SmUUID = XString8();
|
||||
bool NoRomInfo = 0;
|
||||
uint8_t EnabledCores = 0;
|
||||
bool TrustSMBIOS = 0;
|
||||
bool InjectMemoryTables = 0;
|
||||
uint8_t BoardType = 0;
|
||||
uint8_t ChassisType = 0;
|
||||
XBool NoRomInfo = false;
|
||||
uint8_t EnabledCores = 0;
|
||||
XBool TrustSMBIOS = false;
|
||||
XBool InjectMemoryTables = false;
|
||||
uint8_t BoardType = 0;
|
||||
uint8_t ChassisType = 0;
|
||||
|
||||
class SlotDevicesArrayClass : protected XObjArray<SLOT_DEVICE>
|
||||
{
|
||||
using super = XObjArray<SLOT_DEVICE>;
|
||||
public:
|
||||
void setEmpty() { super::setEmpty(); }
|
||||
void AddReference(SLOT_DEVICE* newElement, bool FreeIt) { super::AddReference(newElement, FreeIt); }
|
||||
void AddReference(SLOT_DEVICE* newElement, XBool FreeIt) { super::AddReference(newElement, FreeIt); }
|
||||
|
||||
const SLOT_DEVICE& getSlotForIndex(size_t Index) const {
|
||||
if ( Index >= MAX_RAM_SLOTS) {
|
||||
@ -185,7 +185,7 @@ class SmbiosInjectedSettings
|
||||
AddReference(slotDevice, true);
|
||||
return *slotDevice;
|
||||
}
|
||||
bool isSlotForIndexValid(uint8_t Index) const {
|
||||
XBool isSlotForIndexValid(uint8_t Index) const {
|
||||
if ( Index >= MAX_RAM_SLOTS) {
|
||||
log_technical_bug("%s : Index >= MAX_RAM_SLOTS", __PRETTY_FUNCTION__);
|
||||
}
|
||||
@ -205,11 +205,11 @@ class SmbiosInjectedSettings
|
||||
uint64_t ExtendedFirmwareFeaturesMask = 0;
|
||||
int8_t Attribute = 0;
|
||||
|
||||
bool KPDELLSMBIOS = 0;
|
||||
XBool KPDELLSMBIOS = false;
|
||||
|
||||
// CPU
|
||||
uint16_t CpuType = 0;
|
||||
bool SetTable132 = 0;
|
||||
XBool SetTable132 = false;
|
||||
uint16_t QPI = 0;
|
||||
|
||||
// from SmBios
|
||||
@ -242,7 +242,7 @@ extern APPLE_SMBIOS_STRUCTURE_POINTER SmbiosTable;
|
||||
|
||||
// TODO stop using globals.
|
||||
extern MEM_STRUCTURE gRAM;
|
||||
extern XBool gMobile;
|
||||
extern XBool gMobile;
|
||||
|
||||
|
||||
|
||||
@ -256,7 +256,7 @@ EFI_STATUS PrepatchSmbios(SmbiosDiscoveredSettings* smbiosSettings);
|
||||
void PatchSmbios(const SmbiosInjectedSettings& smbiosSettings);
|
||||
void FinalizeSmbios(const SmbiosInjectedSettings& smbiosSettings);
|
||||
|
||||
bool getMobileFromSmbios();
|
||||
XBool getMobileFromSmbios();
|
||||
XString8 getSmUUIDFromSmbios();
|
||||
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
||||
#endif
|
||||
|
||||
|
||||
XBool smbIntel;
|
||||
XBool smbIntel;
|
||||
UINT8 smbPage;
|
||||
|
||||
CONST CHAR8 *spd_memory_types[] =
|
||||
|
@ -65,7 +65,7 @@ DBG("FixOwnership() -> begin\n");
|
||||
|
||||
UINTN isOSowned;
|
||||
UINTN isBIOSowned;
|
||||
XBool isOwnershipConflict;
|
||||
XBool isOwnershipConflict;
|
||||
|
||||
//
|
||||
// Find the usb host controller
|
||||
|
@ -23,7 +23,7 @@ extern "C" {
|
||||
|
||||
XBool ReadAllKeyStrokes(void)
|
||||
{
|
||||
XBool GotKeyStrokes;
|
||||
XBool GotKeyStrokes;
|
||||
EFI_STATUS Status;
|
||||
EFI_INPUT_KEY key;
|
||||
|
||||
|
@ -52,7 +52,7 @@ PrintBytes(IN void *Bytes, IN UINTN Number)
|
||||
}
|
||||
}
|
||||
|
||||
bool gEnableCloverLog = false;
|
||||
XBool gEnableCloverLog = false;
|
||||
|
||||
// Changed MsgLog(...) it now calls this function
|
||||
// with DebugMode == 0. - apianti
|
||||
|
@ -52,7 +52,7 @@ PrintBytes(IN void *Bytes, IN UINTN Number)
|
||||
}
|
||||
}
|
||||
|
||||
bool gEnableCloverLog = false;
|
||||
XBool gEnableCloverLog = false;
|
||||
|
||||
// Changed MsgLog(...) it now calls this function
|
||||
// with DebugMode == 0. - apianti
|
||||
|
@ -524,7 +524,7 @@ EFI_STATUS LoadPlist(const XStringW& ConfName, C* plist)
|
||||
}
|
||||
|
||||
XmlLiteParser xmlLiteParser;
|
||||
bool parsingOk = plist->parse((const CHAR8*)ConfigPtr, Size, ""_XS8, &xmlLiteParser);
|
||||
XBool parsingOk = plist->parse((const CHAR8*)ConfigPtr, Size, ""_XS8, &xmlLiteParser);
|
||||
if ( xmlLiteParser.getErrorsAndWarnings().size() ) {
|
||||
if ( xmlLiteParser.getErrorsAndWarnings().size() > 1 ) {
|
||||
DebugLog(2, "There are problems in plist '%ls'\n", configPlistPath.wc_str());
|
||||
|
@ -52,10 +52,10 @@ public:
|
||||
EFI_HANDLE Handle = 0;
|
||||
UINT8 *Mmio = 0;
|
||||
UINT32 Connectors = 0;
|
||||
XBool ConnChanged = false;
|
||||
XBool ConnChanged = false;
|
||||
|
||||
// ATTENTION : this is not discovered. This will be assigned once config plist is read.
|
||||
bool LoadVBios = 0;
|
||||
XBool LoadVBios = false;
|
||||
|
||||
DiscoveredGfx() {}
|
||||
DiscoveredGfx(const DiscoveredGfx&) = default; // default copy is ok because we can copy Mmio, because it's not allocated and still make sense once copied.
|
||||
@ -67,7 +67,7 @@ class GfxPropertiesArrayClass : public XObjArray<DiscoveredGfx>
|
||||
public:
|
||||
|
||||
|
||||
bool hasBrand(HRDW_MANUFACTERER brand) const {
|
||||
XBool hasBrand(HRDW_MANUFACTERER brand) const {
|
||||
for ( size_t idx = 0 ; idx < size() ; ++idx ) {
|
||||
if ( ElementAt(idx).Vendor == brand ) return true;
|
||||
}
|
||||
@ -75,11 +75,11 @@ public:
|
||||
}
|
||||
|
||||
|
||||
bool hasNvidia() const { return hasBrand(Nvidia); }
|
||||
bool hasIntel() const { return hasBrand(Intel); }
|
||||
XBool hasNvidia() const { return hasBrand(Nvidia); }
|
||||
XBool hasIntel() const { return hasBrand(Intel); }
|
||||
|
||||
bool isCardAtPosIntel(size_t pos) const { return size() > pos && ElementAt(pos).Vendor == Intel; }
|
||||
bool isCardAtPosNvidia(size_t pos) const { return size() > pos && ElementAt(pos).Vendor == Nvidia; }
|
||||
XBool isCardAtPosIntel(size_t pos) const { return size() > pos && ElementAt(pos).Vendor == Intel; }
|
||||
XBool isCardAtPosNvidia(size_t pos) const { return size() > pos && ElementAt(pos).Vendor == Nvidia; }
|
||||
|
||||
};
|
||||
|
||||
@ -113,7 +113,7 @@ class LanCardArrayClass : public XObjArray<LanCardClass>
|
||||
{
|
||||
public:
|
||||
/* Requirment : MacAddressToLookFor is 6 chars long */
|
||||
bool containsMacAddress(const UINT8* MacAddressToLookFor) const {
|
||||
XBool containsMacAddress(const UINT8* MacAddressToLookFor) const {
|
||||
for ( size_t idx = 0 ; idx < size() ; ++idx ) {
|
||||
if ( memcmp(MacAddressToLookFor, ElementAt(idx).MacAddress, 6) == 0 ) return true;
|
||||
}
|
||||
|
@ -11,32 +11,32 @@
|
||||
|
||||
|
||||
|
||||
bool ConfigPlistAbstractClass::parse(XmlLiteParser* xmlLiteParser, const XString8& xmlPath)
|
||||
XBool ConfigPlistAbstractClass::parse(XmlLiteParser* xmlLiteParser, const XString8& xmlPath)
|
||||
{
|
||||
xmlLiteParser->moveForwardUntilSignificant();
|
||||
xmlLiteParser->skipHeader();
|
||||
auto pos = xmlLiteParser->getPosition();
|
||||
bool b = parseFromXmlLite(xmlLiteParser, xmlPath, true);
|
||||
XBool b = parseFromXmlLite(xmlLiteParser, xmlPath, true);
|
||||
if ( !b ) return false;
|
||||
b = validate(xmlLiteParser, xmlPath, pos, true);
|
||||
return b;
|
||||
}
|
||||
|
||||
bool ConfigPlistAbstractClass::parse(const LString8& buf, size_t size, const XString8& xmlPath, XmlLiteParser* xmlLiteParser)
|
||||
XBool ConfigPlistAbstractClass::parse(const LString8& buf, size_t size, const XString8& xmlPath, XmlLiteParser* xmlLiteParser)
|
||||
{
|
||||
xmlLiteParser->init(buf.c_str(), size);
|
||||
return parse(xmlLiteParser, xmlPath);
|
||||
}
|
||||
|
||||
|
||||
bool ConfigPlistAbstractClass::parse(const LString8& buf, size_t size, const XString8& xmlPath)
|
||||
XBool ConfigPlistAbstractClass::parse(const LString8& buf, size_t size, const XString8& xmlPath)
|
||||
{
|
||||
XmlLiteParser xmlLiteParser;
|
||||
xmlLiteParser.init(buf.c_str(), size);
|
||||
return parse(&xmlLiteParser, xmlPath);
|
||||
}
|
||||
|
||||
bool ConfigPlistAbstractClass::parse(const LString8& buf, size_t size)
|
||||
XBool ConfigPlistAbstractClass::parse(const LString8& buf, size_t size)
|
||||
{
|
||||
return parse(buf, size, ""_XS8);
|
||||
}
|
||||
|
@ -18,10 +18,10 @@ public:
|
||||
|
||||
ConfigPlistAbstractClass() {};
|
||||
|
||||
bool parse(XmlLiteParser* xmlLiteParser, const XString8& xmlPath);
|
||||
bool parse(const LString8& buf, size_t size, const XString8& xmlPath, XmlLiteParser* xmlLiteParser);
|
||||
bool parse(const LString8& buf, size_t size, const XString8& xmlPath);
|
||||
bool parse(const LString8& buf, size_t size);
|
||||
XBool parse(XmlLiteParser* xmlLiteParser, const XString8& xmlPath);
|
||||
XBool parse(const LString8& buf, size_t size, const XString8& xmlPath, XmlLiteParser* xmlLiteParser);
|
||||
XBool parse(const LString8& buf, size_t size, const XString8& xmlPath);
|
||||
XBool parse(const LString8& buf, size_t size);
|
||||
|
||||
};
|
||||
|
||||
|
@ -101,7 +101,7 @@ public:
|
||||
|
||||
virtual void getFields(XmlDictField** fields, size_t* nb) override { *fields = m_fields; *nb = sizeof(m_fields)/sizeof(m_fields[0]); };
|
||||
|
||||
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override {
|
||||
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override {
|
||||
if ( !super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors) ) return false;
|
||||
if ( !isDefined() ) return true;
|
||||
if ( LString8(ACPI.DSDT.Fixes.ACPI_DSDT_Fixe_Array[29].getNewName()) != "FixHeaders_20000000"_XS8 ) {
|
||||
|
@ -76,7 +76,7 @@ public:
|
||||
class Signature_Class : public XmlString8AllowEmpty
|
||||
{
|
||||
using super = XmlString8AllowEmpty;
|
||||
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override {
|
||||
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override {
|
||||
if ( !super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors) ) return false;
|
||||
if ( !isDefined() ) return true;
|
||||
if ( xstring8.length() == 4 ) return true;
|
||||
@ -111,7 +111,7 @@ public:
|
||||
return *(UINT64*)&Id;
|
||||
};
|
||||
UINT32 dgetTabLength() const { return Length.isDefined() ? Length.value() : 0; };
|
||||
bool dgetOtherOS() const { return DropForAllOS.isDefined() ? DropForAllOS.value() : false; };
|
||||
XBool dgetOtherOS() const { return DropForAllOS.isDefined() ? DropForAllOS.value() : XBool(false); };
|
||||
|
||||
|
||||
};
|
||||
@ -173,13 +173,13 @@ public:
|
||||
|
||||
const decltype(FixHeaders)& getFixHeaders() const { return FixHeaders; };
|
||||
|
||||
bool dgetSlpSmiEnable() const { return HaltEnabler.isDefined() ? HaltEnabler.value() : false; };
|
||||
bool dgetFixHeaders() const { return FixHeaders.isDefined() ? FixHeaders.value() : false; };
|
||||
bool dgetFixMCFG() const { return FixMCFG.isDefined() ? FixMCFG.value() : false; };
|
||||
bool dgetNoASPM() const { return DisableASPM.isDefined() ? DisableASPM.value() : false; };
|
||||
bool dgetsmartUPS() const { return smartUPS.isDefined() ? smartUPS.value() : false; };
|
||||
bool dgetPatchNMI() const { return PatchAPIC.isDefined() ? PatchAPIC.value() : false; };
|
||||
bool dgetAutoMerge() const { return AutoMerge.isDefined() ? AutoMerge.value() : false; };
|
||||
XBool dgetSlpSmiEnable() const { return HaltEnabler.isDefined() ? HaltEnabler.value() : XBool(false); };
|
||||
XBool dgetFixHeaders() const { return FixHeaders.isDefined() ? FixHeaders.value() : XBool(false); };
|
||||
XBool dgetFixMCFG() const { return FixMCFG.isDefined() ? FixMCFG.value() : XBool(false); };
|
||||
XBool dgetNoASPM() const { return DisableASPM.isDefined() ? DisableASPM.value() : XBool(false); };
|
||||
XBool dgetsmartUPS() const { return smartUPS.isDefined() ? smartUPS.value() : XBool(false); };
|
||||
XBool dgetPatchNMI() const { return PatchAPIC.isDefined() ? PatchAPIC.value() : XBool(false); };
|
||||
XBool dgetAutoMerge() const { return AutoMerge.isDefined() ? AutoMerge.value() : XBool(false); };
|
||||
const decltype(DisabledAML)::ValueType& dgetDisabledAML() const { return DisabledAML.isDefined() ? DisabledAML.value() : DisabledAML.nullValue; };
|
||||
const decltype(SortedOrder)::ValueType& dgetSortedACPI() const { return SortedOrder.isDefined() ? SortedOrder.value() : SortedOrder.nullValue; };
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
|
||||
|
||||
XmlAbstractType& ConfigPlistClass::ACPI_Class::DSDT_Class::ACPI_DSDT_Fixes_Class::parseValueFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, bool generateErrors, const XmlParserPosition &keyPos, const char *keyValue, size_t keyValueLength, bool* keyFound)
|
||||
XmlAbstractType& ConfigPlistClass::ACPI_Class::DSDT_Class::ACPI_DSDT_Fixes_Class::parseValueFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, XBool generateErrors, const XmlParserPosition &keyPos, const char *keyValue, size_t keyValueLength, XBool* keyFound)
|
||||
{
|
||||
#ifdef JIEF_DEBUG
|
||||
if ( strncmp(keyValue, "FixHeaders", strlen("FixHeaders")) == 0 ) {
|
||||
|
@ -35,8 +35,8 @@ public:
|
||||
ACPI_DSDT_Fix& operator = (const ACPI_DSDT_Fix&) = delete; // { panic("copy ctor"); }; // = delete;
|
||||
|
||||
virtual const char* getDescription() override { panic("not defined"); };
|
||||
virtual bool isTheNextTag(XmlLiteParser* xmlLiteParser) override { panic("not defined"); };
|
||||
virtual bool parseFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, bool generateErrors) override { panic("not defined"); };
|
||||
virtual XBool isTheNextTag(XmlLiteParser* xmlLiteParser) override { panic("not defined"); };
|
||||
virtual XBool parseFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, XBool generateErrors) override { panic("not defined"); };
|
||||
|
||||
virtual void reset() override {
|
||||
super::reset();
|
||||
@ -48,10 +48,10 @@ public:
|
||||
const CHAR8* getOldName() const { return m_oldName; }
|
||||
uint32_t getBitData() const { return m_bitData; }
|
||||
|
||||
bool dgetOldEnabled() const { return oldEnabled.isDefined() ? oldEnabled.value() : false; };
|
||||
bool dgetNewEnabled() const { return newEnabled.isDefined() ? newEnabled.value() : false; };
|
||||
XBool dgetOldEnabled() const { return oldEnabled.isDefined() ? oldEnabled.value() : XBool(false); };
|
||||
XBool dgetNewEnabled() const { return newEnabled.isDefined() ? newEnabled.value() : XBool(false); };
|
||||
|
||||
bool dgetEnabled() const {
|
||||
XBool dgetEnabled() const {
|
||||
if ( oldEnabled.isDefined() && oldEnabled.value() ) return true;
|
||||
if ( newEnabled.isDefined() && newEnabled.value() ) return true;
|
||||
return false;
|
||||
@ -104,9 +104,9 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
virtual XmlAbstractType& parseValueFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, bool generateErrors, const XmlParserPosition &keyPos, const char *keyValue, size_t keyValueLength, bool* keyFound) override;
|
||||
virtual XmlAbstractType& parseValueFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, XBool generateErrors, const XmlParserPosition &keyPos, const char *keyValue, size_t keyValueLength, XBool* keyFound) override;
|
||||
|
||||
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override {
|
||||
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override {
|
||||
if ( !super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors) ) return false;
|
||||
if ( !isDefined() ) return true;
|
||||
// if ( LString8(ACPI_DSDT_Fixe_Array[29].getNewName()) != "FixHeaders_20000000"_XS8 ) {
|
||||
@ -135,7 +135,7 @@ public:
|
||||
}
|
||||
return FixDsdt;
|
||||
}
|
||||
bool dgetFixHeaders() const {
|
||||
XBool dgetFixHeaders() const {
|
||||
return getFixHeaders().dgetEnabled();
|
||||
}
|
||||
};
|
||||
@ -147,7 +147,7 @@ public:
|
||||
class TgtBridgeClass : public XmlData
|
||||
{
|
||||
using super = XmlData;
|
||||
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override {
|
||||
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override {
|
||||
#ifdef JIEF_DEBUG
|
||||
if ( xmlPath.contains("ACPI/DSDT/Patches[15]"_XS8) ) {
|
||||
NOP;
|
||||
@ -175,8 +175,8 @@ if ( xmlPath.contains("ACPI/DSDT/Patches[15]"_XS8) ) {
|
||||
|
||||
virtual void getFields(XmlDictField** fields, size_t* nb) override { *fields = m_fields; *nb = sizeof(m_fields)/sizeof(m_fields[0]); };
|
||||
public:
|
||||
bool dgetDisabled() const { return Disabled.isDefined() ? Disabled.value() : false; };
|
||||
uint8_t dgetBValue() const { return Disabled.isDefined() ? Disabled.value() : false; };
|
||||
XBool dgetDisabled() const { return Disabled.isDefined() ? Disabled.value() : XBool(false); };
|
||||
uint8_t dgetBValue() const { return Disabled.isDefined() ? Disabled.value() : XBool(false); };
|
||||
XString8 dgetPatchDsdtLabel() const { return Comment.isDefined() ? Comment.value() : "(NoLabel)"_XS8; };
|
||||
const XBuffer<UINT8>& dgetPatchDsdtFind() const { return Find.isDefined() ? Find.value() : XBuffer<UINT8>::NullXBuffer; };
|
||||
const XBuffer<UINT8>& dgetPatchDsdtReplace() const { return Replace.isDefined() ? Replace.value() : XBuffer<UINT8>::NullXBuffer; };
|
||||
@ -211,8 +211,8 @@ public:
|
||||
virtual void getFields(XmlDictField** fields, size_t* nb) override { *fields = m_fields; *nb = sizeof(m_fields)/sizeof(m_fields[0]); };
|
||||
|
||||
XString8 dgetDsdtName() const { return Name.isDefined() && Name.value().notEmpty() ? Name.value() : "DSDT.aml"_XS8; };
|
||||
bool dgetDebugDSDT() const { return Debug.isDefined() ? Debug.value() : false; };
|
||||
bool dgetRtc8Allowed() const { return Rtc8Allowed.isDefined() ? Rtc8Allowed.value() : false; };
|
||||
XBool dgetDebugDSDT() const { return Debug.isDefined() ? Debug.value() : XBool(false); };
|
||||
XBool dgetRtc8Allowed() const { return Rtc8Allowed.isDefined() ? Rtc8Allowed.value() : XBool(false); };
|
||||
uint8_t dgetPNLF_UID() const { return isDefined() ? PNLF_UID.isDefined() ? PNLF_UID.value() : 0x0a : 0; }; // TODO: different default value if section is not defined
|
||||
uint32_t dgetFixDsdt() const {
|
||||
// priority is given to Fixes
|
||||
@ -221,8 +221,8 @@ public:
|
||||
};
|
||||
// const ACPI_DSDT_Fixes_Class& getFixes() const { return Fixes; };
|
||||
// const XmlArray<ACPI_DSDT_Patch_Class>& getPatches() const { return Patches; };
|
||||
bool dgetReuseFFFF() const { return ReuseFFFF.isDefined() ? ReuseFFFF.value() : false; };
|
||||
bool dgetSuspendOverride() const { return SuspendOverride.isDefined() ? SuspendOverride.value() : false; };
|
||||
XBool dgetReuseFFFF() const { return ReuseFFFF.isDefined() ? ReuseFFFF.value() : XBool(false); };
|
||||
XBool dgetSuspendOverride() const { return SuspendOverride.isDefined() ? SuspendOverride.value() : XBool(false); };
|
||||
|
||||
};
|
||||
|
||||
|
@ -37,11 +37,11 @@ protected:
|
||||
public:
|
||||
virtual void getFields(XmlDictField** fields, size_t* nb) override { *fields = m_fields; *nb = sizeof(m_fields)/sizeof(m_fields[0]); };
|
||||
|
||||
bool dgetPStates() const { return PStates.isDefined() ? PStates.value() : false; };
|
||||
bool dgetCStates() const { return CStates.isDefined() ? CStates.value() : false; };
|
||||
bool dgetAPSN() const { return APSN.isDefined() ? APSN.value() : false; };
|
||||
bool dgetAPLF() const { return APLF.isDefined() ? APLF.value() : false; };
|
||||
bool dgetPluginType() const { return PluginType.isDefined() ? PluginType.value() : false; };
|
||||
XBool dgetPStates() const { return PStates.isDefined() ? PStates.value() : XBool(false); };
|
||||
XBool dgetCStates() const { return CStates.isDefined() ? CStates.value() : XBool(false); };
|
||||
XBool dgetAPSN() const { return APSN.isDefined() ? APSN.value() : XBool(false); };
|
||||
XBool dgetAPLF() const { return APLF.isDefined() ? APLF.value() : XBool(false); };
|
||||
XBool dgetPluginType() const { return PluginType.isDefined() ? PluginType.value() : XBool(false); };
|
||||
|
||||
undefinable_bool getPStates() const { return PStates.isDefined() ? undefinable_bool(PStates.value()) : undefinable_bool(); };
|
||||
undefinable_bool getCStates() const { return CStates.isDefined() ? undefinable_bool(CStates.value()) : undefinable_bool(); };
|
||||
@ -65,23 +65,23 @@ public:
|
||||
public:
|
||||
virtual void getFields(XmlUnionField** fields, size_t* nb) override { *fields = m_fields; *nb = sizeof(m_fields)/sizeof(m_fields[0]); };
|
||||
|
||||
bool dgetGeneratePStates() const {
|
||||
XBool dgetGeneratePStates() const {
|
||||
if ( xmlBool.isDefined() ) return xmlBool.value();
|
||||
return xmlDict.dgetPStates();
|
||||
}
|
||||
bool dgetGenerateCStates() const {
|
||||
XBool dgetGenerateCStates() const {
|
||||
if ( xmlBool.isDefined() ) return xmlBool.value();
|
||||
return xmlDict.dgetCStates();
|
||||
}
|
||||
bool dgetGenerateAPSN() const {
|
||||
XBool dgetGenerateAPSN() const {
|
||||
if ( xmlBool.isDefined() ) return xmlBool.value();
|
||||
return xmlDict.dgetAPSN();
|
||||
}
|
||||
bool dgetGenerateAPLF() const {
|
||||
XBool dgetGenerateAPLF() const {
|
||||
if ( xmlBool.isDefined() ) return xmlBool.value();
|
||||
return xmlDict.dgetAPLF();
|
||||
}
|
||||
bool dgetGeneratePluginType() const {
|
||||
XBool dgetGeneratePluginType() const {
|
||||
if ( xmlBool.isDefined() ) return xmlBool.value();
|
||||
return xmlDict.dgetPluginType();
|
||||
}
|
||||
@ -152,18 +152,18 @@ protected:
|
||||
public:
|
||||
virtual void getFields(XmlDictField** fields, size_t* nb) override { *fields = m_fields; *nb = sizeof(m_fields)/sizeof(m_fields[0]); };
|
||||
|
||||
bool dgetDropSSDTSetting() const { return DropOem.isDefined() ? DropOem.value() : false; };
|
||||
bool dgetNoOemTableId() const { return NoOemTableId.isDefined() ? NoOemTableId.value() : false; };
|
||||
bool dgetNoDynamicExtract() const { return NoDynamicExtract.isDefined() ? NoDynamicExtract.value() : false; };
|
||||
bool dgetEnableISS() const { return UseSystemIO.isDefined() ? UseSystemIO.value() : false; };
|
||||
bool dgetEnableC7() const { return EnableC7.isDefined() ? EnableC7.value() : false; };
|
||||
bool dget_EnableC6() const { return EnableC6.isDefined() ? EnableC6.value() : false; };
|
||||
bool dget_EnableC4() const { return EnableC4.isDefined() ? EnableC4.value() : false; };
|
||||
bool dget_EnableC2() const { return EnableC2.isDefined() ? EnableC2.value() : false; };
|
||||
XBool dgetDropSSDTSetting() const { return DropOem.isDefined() ? DropOem.value() : XBool(false); };
|
||||
XBool dgetNoOemTableId() const { return NoOemTableId.isDefined() ? NoOemTableId.value() : XBool(false); };
|
||||
XBool dgetNoDynamicExtract() const { return NoDynamicExtract.isDefined() ? NoDynamicExtract.value() : XBool(false); };
|
||||
XBool dgetEnableISS() const { return UseSystemIO.isDefined() ? UseSystemIO.value() : XBool(false); };
|
||||
XBool dgetEnableC7() const { return EnableC7.isDefined() ? EnableC7.value() : XBool(false); };
|
||||
XBool dget_EnableC6() const { return EnableC6.isDefined() ? EnableC6.value() : XBool(false); };
|
||||
XBool dget_EnableC4() const { return EnableC4.isDefined() ? EnableC4.value() : XBool(false); };
|
||||
XBool dget_EnableC2() const { return EnableC2.isDefined() ? EnableC2.value() : XBool(false); };
|
||||
uint16_t dget_C3Latency() const { return C3Latency.isDefined() ? C3Latency.value() : 0; };
|
||||
uint8_t dgetPLimitDict() const { return PLimitDict.isDefined() ? PLimitDict.value() : 0; };
|
||||
uint8_t dgetUnderVoltStep() const { return UnderVoltStep.isDefined() ? UnderVoltStep.value() : 0; };
|
||||
bool dgetDoubleFirstState() const { return DoubleFirstState.isDefined() ? DoubleFirstState.value() : false; };
|
||||
XBool dgetDoubleFirstState() const { return DoubleFirstState.isDefined() ? DoubleFirstState.value() : XBool(false); };
|
||||
uint8_t dgetMinMultiplier() const { return MinMultiplier.isDefined() ? MinMultiplier.value() : 0; };
|
||||
uint8_t dgetMaxMultiplier() const { return MaxMultiplier.isDefined() ? MaxMultiplier.value() : 0; };
|
||||
uint8_t dgetPluginType() const { return PluginType.isDefined() ? PluginType.value() : 0; };
|
||||
|
@ -31,9 +31,9 @@ class Boot_Class : public XmlDict
|
||||
XmlUnionField m_fields[3] = { xmlBool, xmlInt8, xmlString8 };
|
||||
virtual void getFields(XmlUnionField** fields, size_t* nb) override { *fields = m_fields; *nb = sizeof(m_fields)/sizeof(m_fields[0]); };
|
||||
|
||||
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override {
|
||||
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override {
|
||||
RETURN_IF_FALSE( super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors) );
|
||||
if ( xmlBool.isDefined() ) return true; // ok, whatever bool value is
|
||||
if ( xmlBool.isDefined() ) return true; // ok, whatever XBool value is
|
||||
if ( xmlInt8.isDefined() ) {
|
||||
if ( xmlInt8.value() < -1 || xmlInt8.value() > 2 ) {
|
||||
xmlLiteParser->addWarning(generateErrors, S8Printf("XMPDetection can -1, 0, 1 or 2 for tag '%s:%d'.", xmlPath.c_str(), keyPos.getLine()));
|
||||
@ -92,7 +92,7 @@ public:
|
||||
XmlData xmlData = XmlData();
|
||||
XmlUnionField m_fields[3] = { xmlBool, xmlString8, xmlData};
|
||||
virtual void getFields(XmlUnionField** fields, size_t* nb) override { *fields = m_fields; *nb = sizeof(m_fields)/sizeof(m_fields[0]); };
|
||||
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override {
|
||||
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override {
|
||||
RETURN_IF_FALSE( super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors) );
|
||||
if ( !xmlString8.isDefined() ) return true;
|
||||
if ( xmlString8.value().isEqualIC("Apple") ) return true;
|
||||
@ -134,25 +134,25 @@ public:
|
||||
|
||||
/* dget method means get value and returns default if undefined. dget = short for defaultget */
|
||||
int64_t dgetTimeout() const { return Timeout.isDefined() ? Timeout.value() : -1; };
|
||||
bool dgetSkipHibernateTimeout() const { return SkipHibernateTimeout.isDefined() ? SkipHibernateTimeout.value() : false; };
|
||||
bool dgetDisableCloverHotkeys() const { return DisableCloverHotkeys.isDefined() ? DisableCloverHotkeys.value() : false; };
|
||||
XBool dgetSkipHibernateTimeout() const { return SkipHibernateTimeout.isDefined() ? SkipHibernateTimeout.value() : XBool(false); };
|
||||
XBool dgetDisableCloverHotkeys() const { return DisableCloverHotkeys.isDefined() ? DisableCloverHotkeys.value() : XBool(false); };
|
||||
const XString8& dgetBootArgs() const { return BootArgs.isDefined() ? BootArgs.value() : NullXString8; };
|
||||
bool dgetNeverDoRecovery() const { return NeverDoRecovery.isDefined() ? NeverDoRecovery.value() : false; };
|
||||
XBool dgetNeverDoRecovery() const { return NeverDoRecovery.isDefined() ? NeverDoRecovery.value() : XBool(false); };
|
||||
const decltype(DefaultVolume)::ValueType& dgetDefaultVolume() const {
|
||||
if ( !DefaultVolume.isDefined() ) return DefaultVolume.nullValue;
|
||||
if ( DefaultVolume.value().isEqualIC("LastBootedVolume") ) return DefaultVolume.nullValue;
|
||||
return DefaultVolume.isDefined() ? DefaultVolume.value() : DefaultVolume.nullValue;
|
||||
};
|
||||
const XString8& dgetDefaultLoader() const { return DefaultLoader.isDefined() ? DefaultLoader.value() : NullXString8; };
|
||||
bool dgetDebugLog() const { return Debug.isDefined() ? Debug.value() : false; };
|
||||
bool dgetFastBoot() const { return FastBoot.isDefined() ? FastBoot.value() : false; };
|
||||
bool dgetNoEarlyProgress() const { return NoEarlyProgress.isDefined() ? NoEarlyProgress.value() : false; };
|
||||
bool dgetNeverHibernate() const { return NeverHibernate.isDefined() ? NeverHibernate.value() : false; };
|
||||
bool dgetStrictHibernate() const { return StrictHibernate.isDefined() ? StrictHibernate.value() : false; };
|
||||
bool dgetRtcHibernateAware() const { return RtcHibernateAware.isDefined() ? RtcHibernateAware.value() : false; };
|
||||
bool dgetHibernationFixup() const { return HibernationFixup.isDefined() ? HibernationFixup.value() : false; };
|
||||
bool dgetSignatureFixup() const { return SignatureFixup.isDefined() ? SignatureFixup.value() : false; };
|
||||
INT8 dgetSecureSetting() const { return isDefined() ? SecureBootSetupMode.isDefined() ? SecureBootSetupMode.value() : -1 : 0; }; // to Rename to SecureBootSetupMode // TODO: different default value if section is not defined
|
||||
XBool dgetDebugLog() const { return Debug.isDefined() ? Debug.value() : XBool(false); };
|
||||
XBool dgetFastBoot() const { return FastBoot.isDefined() ? FastBoot.value() : XBool(false); };
|
||||
XBool dgetNoEarlyProgress() const { return NoEarlyProgress.isDefined() ? NoEarlyProgress.value() : XBool(false); };
|
||||
XBool dgetNeverHibernate() const { return NeverHibernate.isDefined() ? NeverHibernate.value() : XBool(false); };
|
||||
XBool dgetStrictHibernate() const { return StrictHibernate.isDefined() ? StrictHibernate.value() : XBool(false); };
|
||||
XBool dgetRtcHibernateAware() const { return RtcHibernateAware.isDefined() ? RtcHibernateAware.value() : XBool(false); };
|
||||
XBool dgetHibernationFixup() const { return HibernationFixup.isDefined() ? HibernationFixup.value() : XBool(false); };
|
||||
XBool dgetSignatureFixup() const { return SignatureFixup.isDefined() ? SignatureFixup.value() : XBool(false); };
|
||||
INT8 dgetSecureSetting() const { return isDefined() ? SecureBootSetupMode.isDefined() ? (int)SecureBootSetupMode.value() : -1 : 0; }; // to Rename to SecureBootSetupMode // TODO: different default value if section is not defined
|
||||
UINT8 dgetSecureBootPolicy() const {
|
||||
if ( !SecureBootPolicy.isDefined() ) return 0;
|
||||
if ( SecureBootPolicy.value().length() < 1 ) return 0;
|
||||
@ -190,14 +190,14 @@ public:
|
||||
// return 0;
|
||||
// };
|
||||
int8_t dgetXMPDetection() const { return XMPDetection.dgetValue(); }
|
||||
XString8 dgetLegacyBoot(bool isFirmwareClover) const { return isDefined() ? Legacy.isDefined() ? Legacy.value() : isFirmwareClover ? "PBR"_XS8 : "LegacyBiosDefault"_XS8 : NullXString8; }; // TODO: different default value if section is not defined
|
||||
XString8 dgetLegacyBoot(XBool isFirmwareClover) const { return isDefined() ? Legacy.isDefined() ? Legacy.value() : isFirmwareClover ? "PBR"_XS8 : "LegacyBiosDefault"_XS8 : NullXString8; }; // TODO: different default value if section is not defined
|
||||
UINT16 dgetLegacyBiosDefaultEntry() const { return LegacyBiosDefaultEntry.isDefined() ? LegacyBiosDefaultEntry.value() : 0; };
|
||||
|
||||
const XString8& dgetCustomLogoAsXString8() const { return CustomLogo.xmlString8.isDefined() ? CustomLogo.xmlString8.value() : NullXString8; };
|
||||
const XBuffer<UINT8>& dgetCustomLogoAsData() const { return CustomLogo.xmlData.isDefined() ? CustomLogo.xmlData.value() : XBuffer<UINT8>::NullXBuffer; };
|
||||
|
||||
/* calculated values */
|
||||
bool dgetLastBootedVolume() const { return DefaultVolume.isDefined() ? DefaultVolume.value() == "LastBootedVolume"_XS8 : false; }
|
||||
XBool dgetLastBootedVolume() const { return DefaultVolume.isDefined() ? DefaultVolume.value() == "LastBootedVolume"_XS8 : false; }
|
||||
UINT8 dgetCustomLogoType() const {
|
||||
if ( CustomLogo.xmlBool.isDefined() ) return CustomLogo.xmlBool.value() ? CUSTOM_BOOT_APPLE : CUSTOM_BOOT_USER_DISABLED;
|
||||
if ( CustomLogo.xmlString8.isDefined() ) {
|
||||
|
@ -18,7 +18,7 @@ protected:
|
||||
{
|
||||
using super = XmlUInt32;
|
||||
public:
|
||||
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override {
|
||||
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override {
|
||||
RETURN_IF_FALSE( super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors) );
|
||||
if ( isDefined() && (value() <= 100 || value() >= 20000) ) {
|
||||
return xmlLiteParser->addError(generateErrors, S8Printf("FrequencyMHz must be >200 and <20000 tag '%s:%d'.", xmlPath.c_str(), keyPos.getLine()));
|
||||
@ -30,7 +30,7 @@ protected:
|
||||
{
|
||||
using super = XmlUInt16;
|
||||
public:
|
||||
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override {
|
||||
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override {
|
||||
RETURN_IF_FALSE( super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors) );
|
||||
return xmlLiteParser->addWarning(generateErrors, S8Printf("Latency is replaced by ACPI/SSDT/C3Latency, value ignored. tag '%s:%d'.", xmlPath.c_str(), keyPos.getLine()));
|
||||
}
|
||||
@ -75,23 +75,23 @@ public:
|
||||
|
||||
CPU_Class() {}
|
||||
|
||||
uint16_t dgetQPI() const { return QPI.isDefined() ? QPI.value() : false; };
|
||||
uint32_t dgetCpuFreqMHz() const { return FrequencyMHz.isDefined() ? FrequencyMHz.value() : false; };
|
||||
uint16_t dgetQPI() const { return QPI.isDefined() ? QPI.value() : 0; };
|
||||
uint32_t dgetCpuFreqMHz() const { return FrequencyMHz.isDefined() ? FrequencyMHz.value() : 0; };
|
||||
uint16_t dgetCpuType() const { return Type.isDefined() ? Type.value() : GetAdvancedCpuType(); };
|
||||
bool dgetQEMU() const { return QEMU.isDefined() ? QEMU.value() : false; };
|
||||
bool dgetUseARTFreq() const { return UseARTFrequency.isDefined() ? UseARTFrequency.value() : false; };
|
||||
uint32_t dgetBusSpeed() const { return BusSpeedkHz.isDefined() ? BusSpeedkHz.value() : false; };
|
||||
XBool dgetQEMU() const { return QEMU.isDefined() ? QEMU.value() : XBool(false); };
|
||||
XBool dgetUseARTFreq() const { return UseARTFrequency.isDefined() ? UseARTFrequency.value() : XBool(false); };
|
||||
uint32_t dgetBusSpeed() const { return BusSpeedkHz.isDefined() ? BusSpeedkHz.value() : 0; };
|
||||
undefinable_bool dget_EnableC6() const { return C6.isDefined() ? undefinable_bool(C6.value()) : undefinable_bool(); };
|
||||
undefinable_bool dget_EnableC4() const { return C4.isDefined() ? undefinable_bool(C4.value()) : undefinable_bool(); };
|
||||
undefinable_bool dget_EnableC2() const { return C2.isDefined() ? undefinable_bool(C2.value()) : undefinable_bool(); };
|
||||
undefinable_uint16 dget_C3Latency() const { return Latency.isDefined() ? undefinable_uint16(Latency.value()) : undefinable_uint16(); };
|
||||
uint8_t dgetSavingMode() const { return SavingMode.isDefined() ? SavingMode.value() : 0xFF; };
|
||||
bool dgetHWPEnable() const { return HWPEnable.isDefined() ? HWPEnable.value() : false; };
|
||||
XBool dgetHWPEnable() const { return HWPEnable.isDefined() ? HWPEnable.value() : XBool(false); };
|
||||
undefinable_uint32 dgetHWPValue() const { return HWPValue.isDefined() ? undefinable_uint32(HWPValue.value()) : undefinable_uint32(); };
|
||||
uint8_t dgetTDP() const { return TDP.isDefined() ? TDP.value() : false; };
|
||||
bool dgetTurboDisabled() const { return TurboDisable.isDefined() ? TurboDisable.value() : false; };
|
||||
XBool dgetTurboDisabled() const { return TurboDisable.isDefined() ? TurboDisable.value() : XBool(false); };
|
||||
|
||||
bool dgetUserChange() const { return BusSpeedkHz.isDefined(); };
|
||||
XBool dgetUserChange() const { return BusSpeedkHz.isDefined(); };
|
||||
|
||||
undefinable_bool getUseARTFreq() const { return UseARTFrequency.isDefined() ? undefinable_bool(UseARTFrequency.value()) : undefinable_bool(); };
|
||||
|
||||
|
@ -122,9 +122,9 @@ protected:
|
||||
const decltype(SetIntelBacklight)::ValueType& dgetIntelBacklight() const { return SetIntelBacklight.isDefined() ? SetIntelBacklight.value() : SetIntelBacklight.nullValue; };
|
||||
const decltype(SetIntelMaxBacklight)::ValueType& dgetIntelMaxBacklight() const { return SetIntelMaxBacklight.isDefined() ? SetIntelMaxBacklight.value() : SetIntelMaxBacklight.nullValue; };
|
||||
const decltype(IntelMaxValue)::ValueType& dgetIntelMaxValue() const { return IntelMaxValue.isDefined() ? IntelMaxValue.value() : IntelMaxValue.nullValue; };
|
||||
bool dgetLANInjection() const { return isDefined() ? LANInjection.isDefined() ? LANInjection.value() : true : false; }; // TODO: different default value if section is not defined
|
||||
XBool dgetLANInjection() const { return isDefined() ? LANInjection.isDefined() ? LANInjection.value() : XBool(true) : XBool(false); }; // TODO: different default value if section is not defined
|
||||
const decltype(HDMIInjection)::ValueType& dgetHDMIInjection() const { return HDMIInjection.isDefined() ? HDMIInjection.value() : HDMIInjection.nullValue; };
|
||||
bool dgetNoDefaultProperties() const { return isDefined() ? NoDefaultProperties.isDefined() ? NoDefaultProperties.value() : true : false; }; // TODO: different default value if section is not defined
|
||||
XBool dgetNoDefaultProperties() const { return isDefined() ? NoDefaultProperties.isDefined() ? NoDefaultProperties.value() : XBool(true) : XBool(false); }; // TODO: different default value if section is not defined
|
||||
const decltype(UseIntelHDMI)::ValueType& dgetUseIntelHDMI() const { return UseIntelHDMI.isDefined() ? UseIntelHDMI.value() : UseIntelHDMI.nullValue; };
|
||||
const decltype(ForceHPET)::ValueType& dgetForceHPET() const { return ForceHPET.isDefined() ? ForceHPET.value() : ForceHPET.nullValue; };
|
||||
const decltype(DisableFunctions)::ValueType& dgetDisableFunctions() const { return DisableFunctions.isDefined() ? DisableFunctions.value() : DisableFunctions.nullValue; };
|
||||
|
@ -14,7 +14,7 @@ class Devices_Arbitrary_Class : public XmlDict
|
||||
public:
|
||||
|
||||
// class PciAddrClass : public XmlString8AllowEmpty {
|
||||
// virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override {
|
||||
// virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override {
|
||||
// RETURN_IF_FALSE( super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors) );
|
||||
// if ( isDefined() && value().length() != 8 ) return xmlLiteParser->addError(generateErrors, S8Printf("PciAddr must be 8 chars long (ex 00:00.01) at line %d.", keyPos.getLine()));
|
||||
// return true;
|
||||
|
@ -21,7 +21,7 @@ class Devices_Audio_Class : public XmlDict
|
||||
XmlString8AllowEmpty xmlString8 = XmlString8AllowEmpty(); // TODO: change XmlString8AllowEmpty for XmlString8AllowEmpty
|
||||
XmlUnionField m_fields[2] = { xmlInt32, xmlString8};
|
||||
virtual void getFields(XmlUnionField** fields, size_t* nb) override { *fields = m_fields; *nb = sizeof(m_fields)/sizeof(m_fields[0]); };
|
||||
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override {
|
||||
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override {
|
||||
RETURN_IF_FALSE( super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors) );
|
||||
if ( !xmlString8.isDefined() ) return true;
|
||||
// if ( xmlString8.value().isEqualIC("Detect") ) return true;
|
||||
@ -45,14 +45,14 @@ class Devices_Audio_Class : public XmlDict
|
||||
};
|
||||
public:
|
||||
virtual void getFields(XmlDictField** fields, size_t* nb) override { *fields = m_fields; *nb = sizeof(m_fields)/sizeof(m_fields[0]); };
|
||||
// virtual bool validate(XmlLiteParser* xmlLiteParser, const char* name, XmlAbstractType* xmlTyp, const XString8& xmlPath, const XmlParserPosition& pos, bool generateErrors) override;
|
||||
// virtual XBool validate(XmlLiteParser* xmlLiteParser, const char* name, XmlAbstractType* xmlTyp, const XString8& xmlPath, const XmlParserPosition& pos, XBool generateErrors) override;
|
||||
|
||||
const decltype(ResetHDA)::ValueType& dgetResetHDA() const { return ResetHDA.isDefined() ? ResetHDA.value() : ResetHDA.nullValue; };
|
||||
const decltype(AFGLowPowerState)::ValueType& dgetAFGLowPowerState() const { return AFGLowPowerState.isDefined() ? AFGLowPowerState.value() : AFGLowPowerState.nullValue; };
|
||||
|
||||
bool dgetHDAInjection() const {
|
||||
XBool dgetHDAInjection() const {
|
||||
if ( !Inject.isDefined() ) return false;
|
||||
if ( Inject.xmlInt32.isDefined() ) return Inject.xmlInt32.value();
|
||||
if ( Inject.xmlInt32.isDefined() ) return Inject.xmlInt32.value() != 0;
|
||||
if ( Inject.xmlString8.isDefined() ) {
|
||||
if ( Inject.xmlString8.value().startWithOrEqualToIC("n") ) return false;
|
||||
if ( Inject.xmlString8.value().startWithOrEqualToIC("0x") ) return true;
|
||||
|
@ -33,7 +33,7 @@ class PropertiesUnion: public XmlUnion
|
||||
|
||||
uint8_t dgetBValue() const {
|
||||
if ( !parent.dgetEnabled() ) return false;
|
||||
return xmlKey().isDefined() ? xmlKey().isEnabled() : false;
|
||||
return xmlKey().isDefined() ? xmlKey().isEnabled() : XBool(false);
|
||||
}
|
||||
const keyType::ValueType& dgetKey() const { return xmlKey().isDefined() ? xmlKey().value() : xmlKey().nullValue; };
|
||||
XBuffer<uint8_t> dgetValue() const { return isDefined() ? value() : XBuffer<uint8_t>::NullXBuffer; };
|
||||
@ -55,7 +55,7 @@ class PropertiesUnion: public XmlUnion
|
||||
public:
|
||||
const keyType::ValueType& dgetLabel() const { return super::xmlKey().isDefined() ? xmlKey().value() : xmlKey().nullValue; };
|
||||
const keyType::ValueType& dgetDevicePathAsString() const { return xmlKey().isDefined() ? xmlKey().value() : xmlKey().nullValue; };
|
||||
bool dgetEnabled() const { return xmlKey().isDefined() ? xmlKey().isEnabled() : false; };
|
||||
XBool dgetEnabled() const { return xmlKey().isDefined() ? xmlKey().isEnabled() : XBool(false); };
|
||||
|
||||
};
|
||||
|
||||
|
@ -34,7 +34,7 @@ protected:
|
||||
virtual void getFields(XmlDictField** fields, size_t* nb) override { *fields = m_fields; *nb = sizeof(m_fields)/sizeof(m_fields[0]); };
|
||||
|
||||
public:
|
||||
decltype(Inject)::ValueType dgetUSBInjection() const { return Inject.isDefined() ? Inject.value() : true; };
|
||||
decltype(Inject)::ValueType dgetUSBInjection() const { return Inject.isDefined() ? Inject.value() : XBool(true); };
|
||||
const decltype(AddClockID)::ValueType& dgetInjectClockID() const { return AddClockID.isDefined() ? AddClockID.value() : AddClockID.nullValue; };
|
||||
const decltype(FixOwnership)::ValueType& dgetUSBFixOwnership() const { return FixOwnership.isDefined() ? FixOwnership.value() : FixOwnership.nullValue; };
|
||||
const decltype(HighCurrent)::ValueType& dgetHighCurrent() const { return HighCurrent.isDefined() ? HighCurrent.value() : HighCurrent.nullValue; };
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "ConfigPlistClass.h"
|
||||
|
||||
|
||||
bool ConfigPlistClass::GUI_Class::GUI_Custom_Class::GUI_Custom_Entry_Class::validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) {
|
||||
XBool ConfigPlistClass::GUI_Class::GUI_Custom_Class::GUI_Custom_Entry_Class::validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) {
|
||||
if ( !super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors) ) return false;
|
||||
for ( size_t idx=0 ; idx < SubEntries.size() ; ++idx ) SubEntries.ElementAt(idx).Parent = this;
|
||||
if ( Arguments.isDefined() && AddArguments.isDefined() ) {
|
||||
|
@ -36,12 +36,12 @@ public:
|
||||
virtual void getFields(XmlDictField** fields, size_t* nb) override { *fields = m_fields; *nb = sizeof(m_fields)/sizeof(m_fields[0]); };
|
||||
|
||||
int64_t dgetPointerSpeed() const { return Speed.isDefined() ? Speed.value() : 2; };
|
||||
bool dgetPointerEnabled() const {
|
||||
XBool dgetPointerEnabled() const {
|
||||
if ( dgetPointerSpeed() <= 0 ) return false; // return false, whatever value Enabled has.
|
||||
if ( Enabled.isDefined() ) return Enabled.value();
|
||||
return true; // if !Enabled.isDefined(), return true because dgetPointerSpeed() > 0
|
||||
}
|
||||
bool dgetPointerMirror() const { return Mirror.isDefined() ? Mirror.value() : false; };
|
||||
XBool dgetPointerMirror() const { return Mirror.isDefined() ? Mirror.value() : XBool(false); };
|
||||
uint64_t dgetDoubleClickTime() const { return DoubleClickTime.isDefined() ? DoubleClickTime.value() : 500; };
|
||||
|
||||
};
|
||||
@ -49,7 +49,7 @@ public:
|
||||
|
||||
|
||||
// -------------------------------------------------- Scan class
|
||||
// bool or dict
|
||||
// XBool or dict
|
||||
class GUI_Scan_Class : public XmlUnion
|
||||
{
|
||||
public:
|
||||
@ -75,15 +75,15 @@ public:
|
||||
public:
|
||||
virtual void getFields(XmlDictField** fields, size_t* nb) override { *fields = m_fields; *nb = sizeof(m_fields)/sizeof(m_fields[0]); };
|
||||
|
||||
bool dgetDisableEntryScan() const { return Entries.isDefined() && Entries.value() == false; };
|
||||
bool dgetDisableToolScan() const { return Tool.isDefined() && Tool.value() == false; };
|
||||
bool dgetLinux() const { return !(Linux.isDefined() && Linux.value() == false); };
|
||||
bool dgetNoLegacy() const {
|
||||
XBool dgetDisableEntryScan() const { return Entries.isDefined() && Entries.value() == false; };
|
||||
XBool dgetDisableToolScan() const { return Tool.isDefined() && Tool.value() == false; };
|
||||
XBool dgetLinux() const { return !(Linux.isDefined() && Linux.value() == false); };
|
||||
XBool dgetNoLegacy() const {
|
||||
if ( !Legacy.isDefined() ) return false;
|
||||
if ( Legacy.xmlBool.isDefined() && Legacy.xmlBool.value() == false ) return true;
|
||||
return false;
|
||||
}
|
||||
bool dgetLegacyFirst() const { return Legacy.isDefined() && Legacy.xmlString8.isDefined() && Legacy.xmlString8.value().startWithIC("F"); };
|
||||
XBool dgetLegacyFirst() const { return Legacy.isDefined() && Legacy.xmlString8.isDefined() && Legacy.xmlString8.value().startWithIC("F"); };
|
||||
UINT8 dgetKernel() const {
|
||||
if ( !Kernel.isDefined() ) return 0;
|
||||
if ( Kernel.xmlBool.isDefined() ) {
|
||||
@ -114,23 +114,23 @@ public:
|
||||
XmlUnionField m_fields[2] = { ScanAsBool, ScanAsAsDict};
|
||||
virtual void getFields(XmlUnionField** fields, size_t* nb) override { *fields = m_fields; *nb = sizeof(m_fields)/sizeof(m_fields[0]); };
|
||||
|
||||
bool dgetDisableEntryScan() const {
|
||||
XBool dgetDisableEntryScan() const {
|
||||
if ( ScanAsBool.isDefined() && ScanAsBool.value() == false ) return true;
|
||||
return ScanAsAsDict.dgetDisableEntryScan();
|
||||
}
|
||||
bool dgetDisableToolScan() const {
|
||||
XBool dgetDisableToolScan() const {
|
||||
if ( ScanAsBool.isDefined() && ScanAsBool.value() == false ) return true;
|
||||
return ScanAsAsDict.dgetDisableToolScan();
|
||||
}
|
||||
bool dgetLinuxScan() const {
|
||||
XBool dgetLinuxScan() const {
|
||||
if ( !ScanAsAsDict.isDefined() ) return parent.isDefined(); // TODO: different default value if section is not defined
|
||||
return ScanAsAsDict.dgetLinux();
|
||||
}
|
||||
bool dgetNoLegacy() const {
|
||||
XBool dgetNoLegacy() const {
|
||||
if ( ScanAsBool.isDefined() && ScanAsBool.value() == false ) return true;
|
||||
return ScanAsAsDict.dgetNoLegacy();
|
||||
}
|
||||
bool dgetLegacyFirst() const {
|
||||
XBool dgetLegacyFirst() const {
|
||||
if ( !ScanAsAsDict.isDefined() ) return false;
|
||||
return ScanAsAsDict.dgetLegacyFirst();
|
||||
}
|
||||
@ -212,7 +212,7 @@ public:
|
||||
XmlString8AllowEmpty xmlString8 = XmlString8AllowEmpty();
|
||||
XmlUnionField m_fields[2] = { xmlBool, xmlString8};
|
||||
virtual void getFields(XmlUnionField** fields, size_t* nb) override { *fields = m_fields; *nb = sizeof(m_fields)/sizeof(m_fields[0]); };
|
||||
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override {
|
||||
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override {
|
||||
RETURN_IF_FALSE( super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors) );
|
||||
if ( !xmlString8.isDefined() ) return true;
|
||||
if ( xmlString8.value().isEqualIC("Always") ) return true;
|
||||
@ -281,13 +281,13 @@ public:
|
||||
|
||||
public:
|
||||
virtual void getFields(XmlDictField** fields, size_t* nb) override { *fields = m_fields; *nb = sizeof(m_fields)/sizeof(m_fields[0]); };
|
||||
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override;
|
||||
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override;
|
||||
|
||||
bool dgetDisabled() const { return Disabled.isDefined() ? Disabled.value() : false; };
|
||||
XBool dgetDisabled() const { return Disabled.isDefined() ? Disabled.value() : XBool(false); };
|
||||
const XStringW& dgetVolume() const { return Volume.isDefined() ? Volume.value() : NullXStringW; };
|
||||
const XStringW& dgetPath() const { return Path.isDefined() ? Path.value() : NullXStringW; };
|
||||
const XStringW& dgetSettings() const { return Settings.isDefined() ? Settings.value() : NullXStringW; };
|
||||
XBool dgetCommonSettings() const { return CommonSettings.isDefined() ? CommonSettings.value() : false; };
|
||||
XBool dgetCommonSettings() const { return CommonSettings.isDefined() ? CommonSettings.value() : XBool(false); };
|
||||
const XString8& dgetAddArguments() const { return AddArguments.isDefined() ? AddArguments.value() : NullXString8; };
|
||||
const undefinable_XString8 dgetArguments() const { return Arguments.isDefined() ? undefinable_XString8(Arguments.value()) : undefinable_XString8(); };
|
||||
const XString8& dgetm_Title() const { return Title.isDefined() ? Title.value() : NullXString8; };
|
||||
@ -319,8 +319,8 @@ public:
|
||||
UINTN Color = AsciiStrHexToUintn(BootBgColor.value());
|
||||
return EFI_GRAPHICS_OUTPUT_BLT_PIXEL({uint8_t((Color >> 8) & 0xFF),uint8_t((Color >> 16) & 0xFF),uint8_t((Color >> 24) & 0xFF),uint8_t((Color >> 0) & 0xFF)});
|
||||
}
|
||||
bool dgetHidden() const { return Hidden.isDefined() && Hidden.xmlBool.isDefined() ? Hidden.xmlBool.value() : false; };
|
||||
bool dgetAlwaysHidden() const { return Hidden.isDefined() && Hidden.xmlString8.isDefined() ? Hidden.xmlString8.value().isEqualIC("Always") : false; };
|
||||
XBool dgetHidden() const { return Hidden.isDefined() && Hidden.xmlBool.isDefined() ? Hidden.xmlBool.value() : XBool(false); };
|
||||
XBool dgetAlwaysHidden() const { return Hidden.isDefined() && Hidden.xmlString8.isDefined() ? Hidden.xmlString8.value().isEqualIC("Always") : false; };
|
||||
UINT8 dgetType() const {
|
||||
if ( Type.isDefined() ) {
|
||||
if ((Type.value().isEqualIC("OSX")) ||
|
||||
@ -377,10 +377,10 @@ public:
|
||||
}
|
||||
|
||||
// 2021-04-22
|
||||
decltype(ForceTextMode)::ValueType dgetForceTextMode() const { return ForceTextMode.isDefined() ? ForceTextMode.value() : false; };
|
||||
decltype(ForceTextMode)::ValueType dgetForceTextMode() const { return ForceTextMode.isDefined() ? ForceTextMode.value() : XBool(false); };
|
||||
|
||||
// /* calculated values */
|
||||
// UINT8 getFlags(bool NoCachesDefault) const {
|
||||
// UINT8 getFlags(XBool NoCachesDefault) const {
|
||||
// UINT8 Flags = 0;
|
||||
// if ( Arguments.isDefined() ) Flags = OSFLAG_SET(Flags, OSFLAG_NODEFAULTARGS);
|
||||
// if ( dgetAlwaysHidden() ) Flags = OSFLAG_SET(Flags, OSFLAG_DISABLED);
|
||||
@ -432,12 +432,12 @@ public:
|
||||
|
||||
public:
|
||||
virtual void getFields(XmlDictField** fields, size_t* nb) override { *fields = m_fields; *nb = sizeof(m_fields)/sizeof(m_fields[0]); };
|
||||
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override {
|
||||
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override {
|
||||
if ( !super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors) ) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool dgetDisabled() const { return Disabled.isDefined() ? Disabled.value() : false; };
|
||||
XBool dgetDisabled() const { return Disabled.isDefined() ? Disabled.value() : XBool(false); };
|
||||
const XString8& dget_AddArguments() const { return AddArguments.isDefined() ? AddArguments.value() : NullXString8; };
|
||||
const undefinable_XString8 dget_Arguments() const { return Arguments.isDefined() ? undefinable_XString8(Arguments.value()) : undefinable_XString8(); };
|
||||
undefinable_XString8 dget_Title() const { return Title.isDefined() ? undefinable_XString8(Title.value()) : undefinable_XString8(); };
|
||||
@ -484,7 +484,7 @@ public:
|
||||
XmlData DriveImageData = XmlData();
|
||||
class HotKeyClass : public XmlString8AllowEmpty {
|
||||
using super = XmlString8AllowEmpty;
|
||||
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override {
|
||||
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override {
|
||||
RETURN_IF_FALSE( super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors) );
|
||||
if ( !isDefined() ) return true;
|
||||
if ( xstring8.length() != 1 ) {
|
||||
@ -520,7 +520,7 @@ public:
|
||||
public:
|
||||
virtual void getFields(XmlDictField** fields, size_t* nb) override { *fields = m_fields; *nb = sizeof(m_fields)/sizeof(m_fields[0]); };
|
||||
|
||||
bool dgetDisabled() const { return Disabled.isDefined() ? Disabled.value() : false; };
|
||||
XBool dgetDisabled() const { return Disabled.isDefined() ? Disabled.value() : XBool(false); };
|
||||
const XString8& dgetVolume() const { return Volume.isDefined() ? Volume.value() : NullXString8; };
|
||||
const XString8& dgetTitle() const { return Title.isDefined() ? Title.value() : NullXString8; };
|
||||
const XString8& dgetFullTitle() const { return FullTitle.isDefined() ? FullTitle.value() : NullXString8; };
|
||||
@ -529,8 +529,8 @@ public:
|
||||
const XString8& dgetDriveImagePath() const { return DriveImagePath.isDefined() ? DriveImagePath.value() : NullXString8; };
|
||||
const XBuffer<UINT8>& dgetDriveImageData() const { return DriveImageData.isDefined() ? DriveImageData.value() : XBuffer<UINT8>::NullXBuffer; };
|
||||
char32_t dgetHotkey() const { return Hotkey.isDefined() && Hotkey.value().notEmpty() ? Hotkey.value()[0] : 0; };
|
||||
bool dgetHidden() const { return Hidden.isDefined() && Hidden.xmlBool.isDefined() ? Hidden.xmlBool.value() : false; };
|
||||
bool dgetAlwaysHidden() const { return Hidden.isDefined() && Hidden.xmlString8.isDefined() ? Hidden.xmlString8.value().isEqualIC("Always") : false; };
|
||||
XBool dgetHidden() const { return Hidden.isDefined() && Hidden.xmlBool.isDefined() ? Hidden.xmlBool.value() : XBool(false); };
|
||||
XBool dgetAlwaysHidden() const { return Hidden.isDefined() && Hidden.xmlString8.isDefined() ? Hidden.xmlString8.value().isEqualIC("Always") : false; };
|
||||
UINT8 dgetType() const {
|
||||
if ( Type.isDefined() ) {
|
||||
if (Type.value().isEqualIC("Windows")) {
|
||||
@ -581,7 +581,7 @@ public:
|
||||
public:
|
||||
virtual void getFields(XmlDictField** fields, size_t* nb) override { *fields = m_fields; *nb = sizeof(m_fields)/sizeof(m_fields[0]); };
|
||||
|
||||
bool dgetDisabled() const { return Disabled.isDefined() ? Disabled.value() : false; };
|
||||
XBool dgetDisabled() const { return Disabled.isDefined() ? Disabled.value() : XBool(false); };
|
||||
const XString8& dgetVolume() const { return Volume.isDefined() ? Volume.value() : NullXString8; };
|
||||
const XString8& dgetPath() const { return Path.isDefined() ? Path.value() : NullXString8; };
|
||||
const XString8& dgetArguments() const { return Arguments.isDefined() ? Arguments.value() : NullXString8; };
|
||||
@ -590,8 +590,8 @@ public:
|
||||
const XString8& dgetImagePath() const { return ImagePath.isDefined() ? ImagePath.value() : NullXString8; };
|
||||
const XBuffer<UINT8>& dgetImageData() const { return ImageData.isDefined() ? ImageData.value() : XBuffer<UINT8>::NullXBuffer; };
|
||||
char32_t dgetHotkey() const { return Hotkey.isDefined() && Hotkey.value().notEmpty() ? Hotkey.value()[0] : 0; };
|
||||
bool dgetHidden() const { return Hidden.isDefined() && Hidden.xmlBool.isDefined() ? Hidden.xmlBool.value() : false; };
|
||||
bool dgetAlwaysHidden() const { return Hidden.isDefined() && Hidden.xmlString8.isDefined() ? Hidden.xmlString8.value().isEqualIC("Always") : false; };
|
||||
XBool dgetHidden() const { return Hidden.isDefined() && Hidden.xmlBool.isDefined() ? Hidden.xmlBool.value() : XBool(false); };
|
||||
XBool dgetAlwaysHidden() const { return Hidden.isDefined() && Hidden.xmlString8.isDefined() ? Hidden.xmlString8.value().isEqualIC("Always") : false; };
|
||||
|
||||
UINT8 dgetVolumeType() const { return VolumeType.isDefined() ? VolumeType.dgetVolumeType() : /*Parent ? Parent->dgetVolumeType() :*/ 0; } // VolumeType is duplicated in DuplicateCustomEntry(), but unconditionnally assigned in FillinCustomEntry(). So no "inheritance" from parent.
|
||||
};
|
||||
@ -623,7 +623,7 @@ protected:
|
||||
// EmbeddedThemeType
|
||||
class EmbeddedThemeTypeClass: public XmlString8AllowEmpty {
|
||||
using super = XmlString8AllowEmpty;
|
||||
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override {
|
||||
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override {
|
||||
RETURN_IF_FALSE( super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors) );
|
||||
if ( xstring8.isEqualIC("Dark") ) return true;
|
||||
if ( xstring8.isEqualIC("Light") ) return true;
|
||||
@ -643,7 +643,7 @@ protected:
|
||||
// ScreenResolution
|
||||
class ScreenResolutionClass: public XmlString8AllowEmpty {
|
||||
using super = XmlString8AllowEmpty;
|
||||
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override {
|
||||
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override {
|
||||
RETURN_IF_FALSE( super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors) );
|
||||
// TODO Check that resolution is Integer x Integer
|
||||
return true;
|
||||
@ -658,7 +658,7 @@ protected:
|
||||
using super = XmlInt64OrString;
|
||||
public:
|
||||
// ConsoleMode_Class() : XmlInt64OrString(false) {};
|
||||
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override {
|
||||
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override {
|
||||
RETURN_IF_FALSE( super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors) );
|
||||
if ( !xmlString8.isDefined() ) return true;
|
||||
if ( xmlString8.value().isEqualIC("Max") ) return true;
|
||||
@ -670,7 +670,7 @@ protected:
|
||||
// Language
|
||||
class LanguageClass: public XmlString8AllowEmpty {
|
||||
using super = XmlString8AllowEmpty;
|
||||
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override {
|
||||
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override {
|
||||
RETURN_IF_FALSE( super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors) );
|
||||
if ( xstring8.containsIC("en") ) return true;
|
||||
if ( xstring8.containsIC("ru") ) return true;
|
||||
@ -733,17 +733,17 @@ public:
|
||||
GUI_Class() : Scan(*this) {}
|
||||
|
||||
virtual void getFields(XmlDictField** fields, size_t* nb) override { *fields = m_fields; *nb = sizeof(m_fields)/sizeof(m_fields[0]); };
|
||||
// virtual bool validate(XmlLiteParser* xmlLiteParser, const char* name, XmlAbstractType* xmlTyp, const XString8& xmlPath, const XmlParserPosition& pos, bool generateErrors) override;
|
||||
// virtual XBool validate(XmlLiteParser* xmlLiteParser, const char* name, XmlAbstractType* xmlTyp, const XString8& xmlPath, const XmlParserPosition& pos, XBool generateErrors) override;
|
||||
|
||||
int32_t dgetTimezone() const { return Timezone.isDefined() ? Timezone.value() : 0xFF; };
|
||||
const XString8& dgetTheme() const { return Theme.isDefined() ? Theme.value() : NullXString8; };
|
||||
const XString8& dgetEmbeddedThemeType() const { return EmbeddedThemeType.isDefined() ? EmbeddedThemeType.value() : NullXString8; };
|
||||
bool dgetPlayAsync() const { return PlayAsync.isDefined() ? PlayAsync.value() : false; };
|
||||
bool dgetCustomIcons() const { return CustomIcons.isDefined() ? CustomIcons.value() : false; };
|
||||
bool dgetTextOnly() const { return TextOnly.isDefined() ? TextOnly.value() : false; };
|
||||
bool dgetShowOptimus() const { return ShowOptimus.isDefined() ? ShowOptimus.value() : false; };
|
||||
XBool dgetPlayAsync() const { return PlayAsync.isDefined() ? PlayAsync.value() : XBool(false); };
|
||||
XBool dgetCustomIcons() const { return CustomIcons.isDefined() ? CustomIcons.value() : XBool(false); };
|
||||
XBool dgetTextOnly() const { return TextOnly.isDefined() ? TextOnly.value() : XBool(false); };
|
||||
XBool dgetShowOptimus() const { return ShowOptimus.isDefined() ? ShowOptimus.value() : XBool(false); };
|
||||
const XString8& dgetScreenResolution() const { return ScreenResolution.isDefined() ? ScreenResolution.value() : NullXString8; };
|
||||
bool dgetProvideConsoleGop() const { return isDefined() ? ProvideConsoleGop.isDefined() ? ProvideConsoleGop.value() : true : false; }; // TODO: different default value if section is not defined
|
||||
XBool dgetProvideConsoleGop() const { return isDefined() ? ProvideConsoleGop.isDefined() ? ProvideConsoleGop.value() : XBool(true) : XBool(false); }; // TODO: different default value if section is not defined
|
||||
int64_t dgetConsoleMode() const {
|
||||
if ( ConsoleMode.xmlInt64.isDefined() ) {
|
||||
return ConsoleMode.xmlInt64.value();
|
||||
@ -801,11 +801,11 @@ public:
|
||||
|
||||
|
||||
|
||||
bool dgetKbdPrevLang() const { return KbdPrevLang.isDefined() ? KbdPrevLang.value() : false; };
|
||||
XBool dgetKbdPrevLang() const { return KbdPrevLang.isDefined() ? KbdPrevLang.value() : XBool(false); };
|
||||
|
||||
/* calculated value */
|
||||
|
||||
bool getDarkEmbedded(bool isDaylight) const {
|
||||
XBool getDarkEmbedded(XBool isDaylight) const {
|
||||
if ( !EmbeddedThemeType.isDefined() ) return false;
|
||||
if ( EmbeddedThemeType.value().isEqualIC("Dark") ) return true;
|
||||
if ( EmbeddedThemeType.value().isEqualIC("Daytime") ) return !isDaylight;
|
||||
|
@ -88,7 +88,7 @@ public:
|
||||
};
|
||||
|
||||
virtual void getFields(XmlDictField** fields, size_t* nb) override { *fields = m_fields; *nb = sizeof(m_fields)/sizeof(m_fields[0]); };
|
||||
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override {
|
||||
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override {
|
||||
RETURN_IF_FALSE( super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors) );
|
||||
if ( Inject.isDefined() ) {
|
||||
if ( Inject.value() ) {
|
||||
@ -147,9 +147,9 @@ public:
|
||||
const decltype(ATI)::ValueType& dgetATI() const { return ATI.isDefined() ? ATI.value() : ATI.nullValue; };
|
||||
const decltype(NVidia)::ValueType& dgetNVidia() const { return NVidia.isDefined() ? NVidia.value() : NVidia.nullValue; };
|
||||
friend class XmlInjectUnion;
|
||||
bool isInjectIntelDefined() const { return Intel.isDefined(); };
|
||||
bool isInjectATIDefined() const { return ATI.isDefined(); };
|
||||
bool isInjectNVidiaDefined() const { return NVidia.isDefined(); };
|
||||
XBool isInjectIntelDefined() const { return Intel.isDefined(); };
|
||||
XBool isInjectATIDefined() const { return ATI.isDefined(); };
|
||||
XBool isInjectNVidiaDefined() const { return NVidia.isDefined(); };
|
||||
};
|
||||
|
||||
class XmlInjectUnion: public XmlUnion
|
||||
@ -160,7 +160,7 @@ public:
|
||||
XmlUnionField m_fields[2] = { xmlBool, xmlDict};
|
||||
virtual void getFields(XmlUnionField** fields, size_t* nb) override { *fields = m_fields; *nb = sizeof(m_fields)/sizeof(m_fields[0]); };
|
||||
public:
|
||||
bool dgetGraphicsInjector() const {
|
||||
XBool dgetGraphicsInjector() const {
|
||||
if ( xmlBool.isDefined() ) return xmlBool.value();
|
||||
return false;
|
||||
}
|
||||
@ -168,9 +168,9 @@ public:
|
||||
const decltype(Graphics_Inject_Class::ATI)::ValueType& dgetInjectATI() const { return xmlBool.isDefined() ? xmlBool.value() : xmlDict.isDefined() ? xmlDict.dgetATI() : decltype(Graphics_Inject_Class::ATI)::nullValue; };
|
||||
const decltype(Graphics_Inject_Class::NVidia)::ValueType& dgetInjectNVidia() const { return xmlBool.isDefined() ? xmlBool.value() : xmlDict.isDefined() ? xmlDict.dgetNVidia() : decltype(Graphics_Inject_Class::NVidia)::nullValue; };
|
||||
|
||||
bool isInjectIntelDefined() const { return xmlBool.isDefined() || xmlDict.isInjectIntelDefined(); };
|
||||
bool isInjectATIDefined() const { return xmlBool.isDefined() || xmlDict.isInjectATIDefined(); };
|
||||
bool isInjectNVidiaDefined() const { return xmlBool.isDefined() || xmlDict.isInjectNVidiaDefined(); };
|
||||
XBool isInjectIntelDefined() const { return xmlBool.isDefined() || xmlDict.isInjectIntelDefined(); };
|
||||
XBool isInjectATIDefined() const { return xmlBool.isDefined() || xmlDict.isInjectATIDefined(); };
|
||||
XBool isInjectNVidiaDefined() const { return xmlBool.isDefined() || xmlDict.isInjectNVidiaDefined(); };
|
||||
};
|
||||
|
||||
protected:
|
||||
|
@ -54,9 +54,9 @@ public:
|
||||
// virtual void getFields(XmlDictField** fields, size_t* nb) override { *fields = m_fields; *nb = sizeof(m_fields)/sizeof(m_fields[0]); };
|
||||
virtual void getFields(XmlDictField** fields, size_t* nb) override { panic("BUG: This cannot be called"); };
|
||||
|
||||
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override {
|
||||
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override {
|
||||
if ( !super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors) ) return false;
|
||||
bool b = true;
|
||||
XBool b = true;
|
||||
// TODO after switch to new parser : name.isEmpty()
|
||||
if ( !Find.isDefined() || Find.value().size() == 0 ) return xmlLiteParser->addWarning(generateErrors, S8Printf("Find has to be defined in dict '%s:%d'.", xmlPath.c_str(), keyPos.getLine()));
|
||||
if ( !Replace.isDefined() || Replace.value().size() == 0 ) return xmlLiteParser->addWarning(generateErrors, S8Printf("One of Find or Replace has to be defined in dict '%s:%d'.", xmlPath.c_str(), keyPos.getLine()));
|
||||
@ -67,7 +67,7 @@ public:
|
||||
return b;
|
||||
}
|
||||
|
||||
bool dgetDisabled() const { return Disabled.isDefined() ? Disabled.value() : false; };
|
||||
XBool dgetDisabled() const { return Disabled.isDefined() ? Disabled.value() : XBool(false); };
|
||||
const XBuffer<UINT8>& dgetFind() const { return Find.isDefined() ? Find.value() : XBuffer<UINT8>::NullXBuffer; };
|
||||
const XBuffer<UINT8>& dgetReplace() const { return Replace.isDefined() ? Replace.value() : XBuffer<UINT8>::NullXBuffer; };
|
||||
XBuffer<UINT8> dgetMaskFind() const
|
||||
@ -152,9 +152,9 @@ public:
|
||||
public:
|
||||
virtual void getFields(XmlDictField** fields, size_t* nb) override { *fields = m_fields; *nb = sizeof(m_fields)/sizeof(m_fields[0]); };
|
||||
|
||||
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override {
|
||||
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override {
|
||||
if ( !super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors) ) return false;
|
||||
bool b = true;
|
||||
XBool b = true;
|
||||
b = super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors);
|
||||
if ( !Name.isDefined() ) {
|
||||
b = xmlLiteParser->addWarning(generateErrors, S8Printf("Kernel patch is ignored because 'Name' is not defined in dict '%s:%d'.", xmlPath.c_str(), keyPos.getLine()));
|
||||
@ -165,7 +165,7 @@ public:
|
||||
|
||||
const XString8& dgetName() const { return Name.isDefined() ? Name.value() : NullXString8; };
|
||||
XString8 dgetLabel() const override { return Comment.isDefined() ? S8Printf("%s (%s)", Name.value().c_str(), Comment.value().c_str()) : S8Printf("%s (NoLabel)", Name.value().c_str()); };
|
||||
bool dgetIsPlistPatch() const { return InfoPlistPatch.isDefined() ? InfoPlistPatch.value() : false; };
|
||||
XBool dgetIsPlistPatch() const { return InfoPlistPatch.isDefined() ? InfoPlistPatch.value() : XBool(false); };
|
||||
|
||||
// override because of different defaultvalue
|
||||
virtual INTN dgetCount() const override { return Count.isDefined() ? Count.value() : 1; };
|
||||
@ -197,8 +197,8 @@ public:
|
||||
public:
|
||||
virtual void getFields(XmlDictField** fields, size_t* nb) override { *fields = m_fields; *nb = sizeof(m_fields)/sizeof(m_fields[0]); };
|
||||
|
||||
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override {
|
||||
bool b = true;
|
||||
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override {
|
||||
XBool b = true;
|
||||
b = super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors);
|
||||
return b;
|
||||
}
|
||||
@ -231,8 +231,8 @@ public:
|
||||
public:
|
||||
virtual void getFields(XmlDictField** fields, size_t* nb) override { *fields = m_fields; *nb = sizeof(m_fields)/sizeof(m_fields[0]); };
|
||||
|
||||
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override {
|
||||
bool b = true;
|
||||
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override {
|
||||
XBool b = true;
|
||||
b = super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors);
|
||||
return b;
|
||||
}
|
||||
@ -245,7 +245,7 @@ public:
|
||||
class ForceKextsToLoadClass : public XmlStringWArray
|
||||
{
|
||||
using super = XmlStringWArray;
|
||||
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override {
|
||||
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override {
|
||||
if ( !super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors) ) return false;
|
||||
if ( value().contains("\\") ) {
|
||||
return xmlLiteParser->addWarning(generateErrors, S8Printf("String cannot contains '\\' for tag '%s:%d'.", xmlPath.c_str(), keyPos.getLine()));
|
||||
@ -294,9 +294,9 @@ public:
|
||||
|
||||
virtual void getFields(XmlDictField** fields, size_t* nb) override { *fields = m_fields; *nb = sizeof(m_fields)/sizeof(m_fields[0]); };
|
||||
|
||||
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override {
|
||||
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override {
|
||||
if ( !super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors) ) return false;
|
||||
bool b = true;
|
||||
XBool b = true;
|
||||
if ( !ATIConnectorsController.isDefined() ) {
|
||||
if ( ATIConnectorsData.isDefined() ) {
|
||||
b = xmlLiteParser->addWarning(generateErrors, S8Printf("ATIConnectorsData is ignored because ATIConnectorsController is not defined in dict '%s:%d'.", xmlPath.c_str(), keyPos.getLine()));
|
||||
@ -324,16 +324,16 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
bool dgetKPDebug() const { return Debug.isDefined() ? Debug.value() : false; };
|
||||
bool dgetKPKernelLapic() const { return KernelLapic.isDefined() ? KernelLapic.value() : false; };
|
||||
bool dgetKPKernelXCPM() const { return KernelXCPM.isDefined() ? KernelXCPM.value() : false; };
|
||||
bool dget_KPKernelPm() const { return KernelPm.isDefined() ? KernelPm.value() : false; };
|
||||
bool dgetKPPanicNoKextDump() const { return PanicNoKextDump.isDefined() ? PanicNoKextDump.value() : false; };
|
||||
bool dget_KPAppleIntelCPUPM() const { return AppleIntelCPUPM.isDefined() ? AppleIntelCPUPM.value() : false; };
|
||||
bool dgetKPAppleRTC() const { return AppleRTC.isDefined() ? AppleRTC.value() : true; };
|
||||
bool dgetEightApple() const { return EightApple.isDefined() ? EightApple.value() : false; };
|
||||
bool dgetKPDELLSMBIOS() const { return DellSMBIOSPatch.isDefined() ? DellSMBIOSPatch.value() : false; };
|
||||
uint32_t dgetFakeCPUID() const { return FakeCPUID.isDefined() ? FakeCPUID.value() : false; };
|
||||
XBool dgetKPDebug() const { return Debug.isDefined() ? Debug.value() : XBool(false); };
|
||||
XBool dgetKPKernelLapic() const { return KernelLapic.isDefined() ? KernelLapic.value() : XBool(false); };
|
||||
XBool dgetKPKernelXCPM() const { return KernelXCPM.isDefined() ? KernelXCPM.value() : XBool(false); };
|
||||
XBool dget_KPKernelPm() const { return KernelPm.isDefined() ? KernelPm.value() : XBool(false); };
|
||||
XBool dgetKPPanicNoKextDump() const { return PanicNoKextDump.isDefined() ? PanicNoKextDump.value() : XBool(false); };
|
||||
XBool dget_KPAppleIntelCPUPM() const { return AppleIntelCPUPM.isDefined() ? AppleIntelCPUPM.value() : XBool(false); };
|
||||
XBool dgetKPAppleRTC() const { return AppleRTC.isDefined() ? AppleRTC.value() : XBool(true); };
|
||||
XBool dgetEightApple() const { return EightApple.isDefined() ? EightApple.value() : XBool(false); };
|
||||
XBool dgetKPDELLSMBIOS() const { return DellSMBIOSPatch.isDefined() ? DellSMBIOSPatch.value() : XBool(false); };
|
||||
uint32_t dgetFakeCPUID() const { return FakeCPUID.isDefined() ? FakeCPUID.value() : 0; };
|
||||
const XString8& dgetKPATIConnectorsController() const { return ATIConnectorsController.isDefined() ? ATIConnectorsController.value() : NullXString8; };
|
||||
const XBuffer<UINT8>& dgetKPATIConnectorsData() const { return ATIConnectorsData.isDefined() ? ATIConnectorsData.value() : XBuffer<UINT8>::NullXBuffer; };
|
||||
const XBuffer<UINT8>& dgetKPATIConnectorsPatch() const { return ATIConnectorsPatch.isDefined() ? ATIConnectorsPatch.value() : XBuffer<UINT8>::NullXBuffer; };
|
||||
|
@ -31,9 +31,9 @@ public:
|
||||
|
||||
virtual void getFields(XmlDictField** fields, size_t* nb) override { *fields = m_fields; *nb = sizeof(m_fields)/sizeof(m_fields[0]); };
|
||||
|
||||
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override {
|
||||
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override {
|
||||
if ( !super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors) ) return false;
|
||||
bool b = true;
|
||||
XBool b = true;
|
||||
if ( !Address.isDefined() || Address.value() == 0) {
|
||||
if ( Enabled.isDefined() && Enabled.value() ) b = xmlLiteParser->addWarning(generateErrors, S8Printf("Enabled is ignored because Address is not defined or 0 in dict '%s:%d'", xmlPath.c_str(), keyPos.getLine()));
|
||||
}
|
||||
@ -66,17 +66,17 @@ public:
|
||||
XmlBool ThirdPartyDrives = XmlBool();
|
||||
XmlBool XhciPortLimit = XmlBool();
|
||||
|
||||
bool dgetAppleXcpmExtraMsrs() const { return AppleXcpmExtraMsrs.isDefined() ? AppleXcpmExtraMsrs.value() : AppleXcpmExtraMsrs.nullValue; };
|
||||
bool dgetAppleXcpmForceBoost() const { return AppleXcpmForceBoost.isDefined() ? AppleXcpmForceBoost.value() : AppleXcpmForceBoost.nullValue; };
|
||||
bool dgetDisableIoMapper() const { return DisableIoMapper.isDefined() ? DisableIoMapper.value() : DisableIoMapper.nullValue; };
|
||||
bool dgetDisableLinkeditJettison() const { return DisableLinkeditJettison.isDefined() ? DisableLinkeditJettison.value() : DisableLinkeditJettison.nullValue; };
|
||||
bool dgetDummyPowerManagement() const { return DummyPowerManagement.isDefined() ? DummyPowerManagement.value() : DummyPowerManagement.nullValue; };
|
||||
bool dgetExtendBTFeatureFlags() const { return ExtendBTFeatureFlags.isDefined() ? ExtendBTFeatureFlags.value() : ExtendBTFeatureFlags.nullValue; };
|
||||
bool dgetExternalDiskIcons() const { return ExternalDiskIcons.isDefined() ? ExternalDiskIcons.value() : ExternalDiskIcons.nullValue; };
|
||||
bool dgetIncreasePciBarSize() const { return IncreasePciBarSize.isDefined() ? IncreasePciBarSize.value() : IncreasePciBarSize.nullValue; };
|
||||
bool dgetPowerTimeoutKernelPanic() const { return PowerTimeoutKernelPanic.isDefined() ? PowerTimeoutKernelPanic.value() : PowerTimeoutKernelPanic.nullValue; };
|
||||
bool dgetThirdPartyDrives() const { return ThirdPartyDrives.isDefined() ? ThirdPartyDrives.value() : ThirdPartyDrives.nullValue; };
|
||||
bool dgetXhciPortLimit() const { return XhciPortLimit.isDefined() ? XhciPortLimit.value() : XhciPortLimit.nullValue; };
|
||||
XBool dgetAppleXcpmExtraMsrs() const { return AppleXcpmExtraMsrs.isDefined() ? AppleXcpmExtraMsrs.value() : AppleXcpmExtraMsrs.nullValue; };
|
||||
XBool dgetAppleXcpmForceBoost() const { return AppleXcpmForceBoost.isDefined() ? AppleXcpmForceBoost.value() : AppleXcpmForceBoost.nullValue; };
|
||||
XBool dgetDisableIoMapper() const { return DisableIoMapper.isDefined() ? DisableIoMapper.value() : DisableIoMapper.nullValue; };
|
||||
XBool dgetDisableLinkeditJettison() const { return DisableLinkeditJettison.isDefined() ? DisableLinkeditJettison.value() : DisableLinkeditJettison.nullValue; };
|
||||
XBool dgetDummyPowerManagement() const { return DummyPowerManagement.isDefined() ? DummyPowerManagement.value() : DummyPowerManagement.nullValue; };
|
||||
XBool dgetExtendBTFeatureFlags() const { return ExtendBTFeatureFlags.isDefined() ? ExtendBTFeatureFlags.value() : ExtendBTFeatureFlags.nullValue; };
|
||||
XBool dgetExternalDiskIcons() const { return ExternalDiskIcons.isDefined() ? ExternalDiskIcons.value() : ExternalDiskIcons.nullValue; };
|
||||
XBool dgetIncreasePciBarSize() const { return IncreasePciBarSize.isDefined() ? IncreasePciBarSize.value() : IncreasePciBarSize.nullValue; };
|
||||
XBool dgetPowerTimeoutKernelPanic() const { return PowerTimeoutKernelPanic.isDefined() ? PowerTimeoutKernelPanic.value() : PowerTimeoutKernelPanic.nullValue; };
|
||||
XBool dgetThirdPartyDrives() const { return ThirdPartyDrives.isDefined() ? ThirdPartyDrives.value() : ThirdPartyDrives.nullValue; };
|
||||
XBool dgetXhciPortLimit() const { return XhciPortLimit.isDefined() ? XhciPortLimit.value() : XhciPortLimit.nullValue; };
|
||||
|
||||
OcKernelQuirks_Class(const Quirks_Class& _parent) /*: parent(_parent)*/ {}
|
||||
};
|
||||
@ -103,23 +103,23 @@ public:
|
||||
XmlBool SignalAppleOS = XmlBool();
|
||||
XmlBool SyncRuntimePermissions = XmlBool();
|
||||
|
||||
bool dgetAvoidRuntimeDefrag() const { return parent.isDefined() ? AvoidRuntimeDefrag.isDefined() ? AvoidRuntimeDefrag.value() : true : false; }; // TODO: different default value if section is not defined
|
||||
bool dgetDevirtualiseMmio() const { return DevirtualiseMmio.isDefined() ? DevirtualiseMmio.value() : DevirtualiseMmio.nullValue; };
|
||||
bool dgetDisableSingleUser() const { return DisableSingleUser.isDefined() ? DisableSingleUser.value() : DisableSingleUser.nullValue; };
|
||||
bool dgetDisableVariableWrite() const { return DisableVariableWrite.isDefined() ? DisableVariableWrite.value() : DisableVariableWrite.nullValue; };
|
||||
bool dgetDiscardHibernateMap() const { return DiscardHibernateMap.isDefined() ? DiscardHibernateMap.value() : DiscardHibernateMap.nullValue; };
|
||||
bool dgetEnableSafeModeSlide() const { return parent.isDefined() ? EnableSafeModeSlide.isDefined() ? EnableSafeModeSlide.value() : true : false; }; // TODO: different default value if section is not defined
|
||||
bool dgetEnableWriteUnprotector() const { return parent.isDefined() ? EnableWriteUnprotector.isDefined() ? EnableWriteUnprotector.value() : true : EnableWriteUnprotector.nullValue; }; // TODO: different default value if section is not defined
|
||||
bool dgetForceExitBootServices() const { return ForceExitBootServices.isDefined() ? ForceExitBootServices.value() : ForceExitBootServices.nullValue; };
|
||||
bool dgetProtectMemoryRegions() const { return ProtectMemoryRegions.isDefined() ? ProtectMemoryRegions.value() : ProtectMemoryRegions.nullValue; };
|
||||
bool dgetProtectSecureBoot() const { return ProtectSecureBoot.isDefined() ? ProtectSecureBoot.value() : ProtectSecureBoot.nullValue; };
|
||||
bool dgetProtectUefiServices() const { return ProtectUefiServices.isDefined() ? ProtectUefiServices.value() : ProtectUefiServices.nullValue; };
|
||||
bool dgetProvideCustomSlide() const { return ProvideCustomSlide.isDefined() ? ProvideCustomSlide.value() : ProvideCustomSlide.nullValue; };
|
||||
XBool dgetAvoidRuntimeDefrag() const { return parent.isDefined() ? AvoidRuntimeDefrag.isDefined() ? AvoidRuntimeDefrag.value() : XBool(true) : XBool(false); }; // TODO: different default value if section is not defined
|
||||
XBool dgetDevirtualiseMmio() const { return DevirtualiseMmio.isDefined() ? DevirtualiseMmio.value() : DevirtualiseMmio.nullValue; };
|
||||
XBool dgetDisableSingleUser() const { return DisableSingleUser.isDefined() ? DisableSingleUser.value() : DisableSingleUser.nullValue; };
|
||||
XBool dgetDisableVariableWrite() const { return DisableVariableWrite.isDefined() ? DisableVariableWrite.value() : DisableVariableWrite.nullValue; };
|
||||
XBool dgetDiscardHibernateMap() const { return DiscardHibernateMap.isDefined() ? DiscardHibernateMap.value() : DiscardHibernateMap.nullValue; };
|
||||
XBool dgetEnableSafeModeSlide() const { return parent.isDefined() ? EnableSafeModeSlide.isDefined() ? EnableSafeModeSlide.value() : XBool(true) : XBool(false); }; // TODO: different default value if section is not defined
|
||||
XBool dgetEnableWriteUnprotector() const { return parent.isDefined() ? EnableWriteUnprotector.isDefined() ? EnableWriteUnprotector.value() : XBool(true) : EnableWriteUnprotector.nullValue; }; // TODO: different default value if section is not defined
|
||||
XBool dgetForceExitBootServices() const { return ForceExitBootServices.isDefined() ? ForceExitBootServices.value() : ForceExitBootServices.nullValue; };
|
||||
XBool dgetProtectMemoryRegions() const { return ProtectMemoryRegions.isDefined() ? ProtectMemoryRegions.value() : ProtectMemoryRegions.nullValue; };
|
||||
XBool dgetProtectSecureBoot() const { return ProtectSecureBoot.isDefined() ? ProtectSecureBoot.value() : ProtectSecureBoot.nullValue; };
|
||||
XBool dgetProtectUefiServices() const { return ProtectUefiServices.isDefined() ? ProtectUefiServices.value() : ProtectUefiServices.nullValue; };
|
||||
XBool dgetProvideCustomSlide() const { return ProvideCustomSlide.isDefined() ? ProvideCustomSlide.value() : ProvideCustomSlide.nullValue; };
|
||||
uint8_t dgetProvideMaxSlide() const { return ProvideMaxSlide.isDefined() ? ProvideMaxSlide.value() : ProvideMaxSlide.nullValue; };
|
||||
bool dgetRebuildAppleMemoryMap() const { return RebuildAppleMemoryMap.isDefined() ? RebuildAppleMemoryMap.value() : RebuildAppleMemoryMap.nullValue; };
|
||||
bool dgetSetupVirtualMap() const { return parent.isDefined() ? SetupVirtualMap.isDefined() ? SetupVirtualMap.value() : true : SetupVirtualMap.nullValue; }; // TODO: different default value if section is not defined
|
||||
bool dgetSignalAppleOS() const { return SignalAppleOS.isDefined() ? SignalAppleOS.value() : SignalAppleOS.nullValue; };
|
||||
bool dgetSyncRuntimePermissions() const { return parent.isDefined() ? SyncRuntimePermissions.isDefined() ? SyncRuntimePermissions.value() : true : false; }; // TODO: different default value if section is not defined
|
||||
XBool dgetRebuildAppleMemoryMap() const { return RebuildAppleMemoryMap.isDefined() ? RebuildAppleMemoryMap.value() : RebuildAppleMemoryMap.nullValue; };
|
||||
XBool dgetSetupVirtualMap() const { return parent.isDefined() ? SetupVirtualMap.isDefined() ? SetupVirtualMap.value() : XBool(true) : SetupVirtualMap.nullValue; }; // TODO: different default value if section is not defined
|
||||
XBool dgetSignalAppleOS() const { return SignalAppleOS.isDefined() ? SignalAppleOS.value() : SignalAppleOS.nullValue; };
|
||||
XBool dgetSyncRuntimePermissions() const { return parent.isDefined() ? SyncRuntimePermissions.isDefined() ? SyncRuntimePermissions.value() : XBool(true) : XBool(false); }; // TODO: different default value if section is not defined
|
||||
|
||||
OcBooterQuirks_Class(const Quirks_Class& _parent) : parent(_parent) {}
|
||||
};
|
||||
@ -170,14 +170,14 @@ public:
|
||||
|
||||
virtual void getFields(XmlDictField** fields, size_t* nb) override { *fields = m_fields; *nb = sizeof(m_fields)/sizeof(m_fields[0]); };
|
||||
|
||||
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override {
|
||||
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override {
|
||||
if ( !super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors) ) return false;
|
||||
bool b = true;
|
||||
XBool b = true;
|
||||
return b;
|
||||
}
|
||||
const decltype(FuzzyMatch)::ValueType& dgetFuzzyMatch() const { return FuzzyMatch.isDefined() ? FuzzyMatch.value() : FuzzyMatch.nullValue; };
|
||||
const decltype(KernelCache)::ValueType& dgetOcKernelCache() const { return KernelCache.isDefined() ? KernelCache.value() : KernelCache.nullValue; };
|
||||
// bool dgetProvideConsoleGop() const { return ProvideConsoleGopEnable.isDefined() ? ProvideConsoleGopEnable.value() : ProvideConsoleGopEnable.nullValue; };
|
||||
// XBool dgetProvideConsoleGop() const { return ProvideConsoleGopEnable.isDefined() ? ProvideConsoleGopEnable.value() : ProvideConsoleGopEnable.nullValue; };
|
||||
UINT32 dgetQuirksMask() const {
|
||||
UINT32 mask = 0;
|
||||
mask |= OcBooterQuirks.dgetAvoidRuntimeDefrag() ? QUIRK_DEFRAG:0;
|
||||
|
@ -20,7 +20,7 @@ public:
|
||||
public:
|
||||
class GuidClass : public XmlString8AllowEmpty {
|
||||
using super = XmlString8AllowEmpty;
|
||||
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override {
|
||||
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override {
|
||||
if ( !super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors) ) return false;
|
||||
if ( !isDefined() ) return true;
|
||||
if ( !IsValidGuidString(xstring8) ) return xmlLiteParser->addWarning(generateErrors, S8Printf("Invalid GUID '%s' - should be in the format XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX in dict '%s:%d'", xstring8.c_str(), xmlPath.c_str(), keyPos.getLine()));
|
||||
@ -67,7 +67,7 @@ public:
|
||||
XmlData xmlData = XmlData();
|
||||
XmlUnionField m_fields[2] = { xmlString8, xmlData};
|
||||
virtual void getFields(XmlUnionField** fields, size_t* nb) override { *fields = m_fields; *nb = sizeof(m_fields)/sizeof(m_fields[0]); };
|
||||
// virtual bool parseFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, bool generateErrors) override
|
||||
// virtual XBool parseFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, XBool generateErrors) override
|
||||
// {
|
||||
// WARNING_IF_DEFINED;
|
||||
//
|
||||
@ -81,7 +81,7 @@ public:
|
||||
// xmlLiteParser->addError(generateErrors, S8Printf("Expecting \"UseMacAddr0\", \"UseMacAddr1\", a string or data for tag '%s:%d'.", xmlPath.c_str(), pos.getLine()));
|
||||
// return false;
|
||||
// }
|
||||
// virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override {
|
||||
// virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override {
|
||||
//if ( !super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors) ) return false;
|
||||
// if ( !xmlString8.isDefined() ) return true;
|
||||
// if ( xmlString8.value().isEqualIC("UseMacAddr0") ) return true;
|
||||
@ -118,7 +118,7 @@ public:
|
||||
};
|
||||
|
||||
// class ROMClass: public XmlData {
|
||||
// virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override {
|
||||
// virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override {
|
||||
//if ( !super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors) ) return false;
|
||||
// if ( "UseMacAddr0"_XS8.isEqualIC(value().CData()) ) return true;
|
||||
// if ( "UseMacAddr1"_XS8.isEqualIC(value().CData()) ) return true;
|
||||
|
@ -15,7 +15,7 @@ class SystemParameters_Class : public XmlDict
|
||||
public:
|
||||
class InjectKextsClass: public XmlBoolOrString {
|
||||
using super = XmlBoolOrString;
|
||||
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override {
|
||||
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override {
|
||||
if ( !super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors) ) return false;
|
||||
if ( isDefined() && xmlString8.isDefined() ) {
|
||||
if ( !xmlString8.value().isEqualIC("Detect") ) return xmlLiteParser->addWarning(generateErrors, S8Printf("InjectKexts must be a boolean or \"Detect\" in dict '%s:%d'", xmlPath.c_str(), keyPos.getLine()));
|
||||
@ -25,7 +25,7 @@ public:
|
||||
};
|
||||
class CustomUUIDClass : public XmlString8AllowEmpty {
|
||||
using super = XmlString8AllowEmpty;
|
||||
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override {
|
||||
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override {
|
||||
if ( !super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors) ) return false;
|
||||
if ( !isDefined() ) return true;
|
||||
if ( !IsValidGuidString(xstring8) ) return xmlLiteParser->addWarning(generateErrors, S8Printf(" invalid CustomUUID '%s' - should be in the format XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX in dict '%s:%d'", xstring8.c_str(), xmlPath.c_str(), keyPos.getLine()));
|
||||
@ -64,20 +64,20 @@ public:
|
||||
|
||||
virtual void getFields(XmlDictField** fields, size_t* nb) override { *fields = m_fields; *nb = sizeof(m_fields)/sizeof(m_fields[0]); };
|
||||
|
||||
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override {
|
||||
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override {
|
||||
if ( !super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors) ) return false;
|
||||
bool b = true;
|
||||
XBool b = true;
|
||||
return b;
|
||||
}
|
||||
|
||||
bool dgetWithKexts() const { return true; } // looks like it can never be false anymore...
|
||||
bool dgetWithKextsIfNoFakeSMC() const { return InjectKexts.xmlString8.isDefined() ? InjectKexts.xmlString8.value().isEqualIC("Detect") : false; }
|
||||
bool dgetNoCaches() const { return NoCaches.isDefined() ? NoCaches.value() : false; }
|
||||
bool dgetBacklightLevelConfig() const { return BacklightLevel.isDefined(); }
|
||||
XBool dgetWithKexts() const { return true; } // looks like it can never be false anymore...
|
||||
XBool dgetWithKextsIfNoFakeSMC() const { return InjectKexts.xmlString8.isDefined() ? InjectKexts.xmlString8.value().isEqualIC("Detect") : false; }
|
||||
XBool dgetNoCaches() const { return NoCaches.isDefined() ? NoCaches.value() : XBool(false); }
|
||||
XBool dgetBacklightLevelConfig() const { return BacklightLevel.isDefined(); }
|
||||
uint16_t dgetBacklightLevel() const { return BacklightLevel.isDefined() && BacklightLevel.xmlInt16.isDefined() ? BacklightLevel.xmlInt16.value() : 0xFFFF; }
|
||||
const XString8& dgetCustomUuid() const { return CustomUUID.isDefined() ? CustomUUID.value() : NullXString8; }
|
||||
UINT8 dget_InjectSystemID() const { return InjectSystemID.isDefined() ? InjectSystemID.value() : 2; }
|
||||
bool dgetNvidiaWeb() const { return NvidiaWeb.isDefined() ? NvidiaWeb.value() : 0; }
|
||||
UINT8 dget_InjectSystemID() const { return InjectSystemID.isDefined() ? (int)InjectSystemID.value() : 2; }
|
||||
XBool dgetNvidiaWeb() const { return NvidiaWeb.isDefined() ? NvidiaWeb.value() : XBool(false); }
|
||||
};
|
||||
|
||||
|
||||
|
@ -128,7 +128,7 @@ To validate and reject bad input, override the method validate. Imagine we have
|
||||
class CountClass : public XmlInt64
|
||||
{
|
||||
using super = XmlInt64;
|
||||
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override {
|
||||
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override {
|
||||
if ( !super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors) ) return false;
|
||||
if ( value() < -2 ) {
|
||||
xmlLiteParser->addWarning(generateErrors, S8Printf("Count cannot be negative. It must a number between -2 and 18 inclusive at '%s:%d'", xmlPath.c_str(), keyPos.getLine()));
|
||||
@ -168,7 +168,7 @@ class MyDictClass : public XmlDict
|
||||
};
|
||||
virtual void getFields(XmlDictField** fields, size_t* nb) override { *fields = m_fields; *nb = sizeof(m_fields)/sizeof(m_fields[0]); };
|
||||
|
||||
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override {
|
||||
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override {
|
||||
if ( !super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors) ) return false;
|
||||
if ( !type.isDefined() ) {
|
||||
xmlLiteParser->addWarning(generateErrors, S8Printf("Type must befined at '%s:%d'", xmlPath.c_str(), keyPos.getLine()));
|
||||
@ -208,7 +208,7 @@ class MyDictClass : public XmlDict
|
||||
};
|
||||
virtual void getFields(XmlDictField** fields, size_t* nb) override { *fields = m_fields; *nb = sizeof(m_fields)/sizeof(m_fields[0]); };
|
||||
|
||||
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override {
|
||||
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override {
|
||||
if ( !super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors) ) return false;
|
||||
if ( !type.isDefined() ) {
|
||||
xmlLiteParser->addWarning(generateErrors, S8Printf("Type must befined at '%s:%d'", xmlPath.c_str(), keyPos.getLine()));
|
||||
@ -326,7 +326,7 @@ int32_t valueOne = array[1].value(); // == 2
|
||||
|
||||
### Union
|
||||
|
||||
Sometimes, a value can be, for example, a bool or a string. In that case it's easy to declare. Just subclass XmlUnion :
|
||||
Sometimes, a value can be, for example, a XBool or a string. In that case it's easy to declare. Just subclass XmlUnion :
|
||||
|
||||
```
|
||||
class XmlBoolOrString : public XmlUnion
|
||||
@ -335,10 +335,10 @@ class XmlBoolOrString : public XmlUnion
|
||||
public:
|
||||
XmlBool xmlBool = XmlBool();
|
||||
XmlString8 xmlString8 = XmlString8();
|
||||
virtual const char* getDescription() override { return "bool or string"; };
|
||||
virtual const char* getDescription() override { return "XBool or string"; };
|
||||
XmlUnionField m_fields[2] = { xmlBool, xmlString8 };
|
||||
virtual void getFields(XmlUnionField** fields, size_t* nb) override { *fields = m_fields; *nb = sizeof(m_fields)/sizeof(m_fields[0]); };
|
||||
};
|
||||
```
|
||||
|
||||
In this example, the value will be tried to be parsed as a bool. If it doesn't work, the next possibility is tried. Here it's xmlString8. You can create union with any kind of field you create, including dict and arrays.
|
||||
In this example, the value will be tried to be parsed as a XBool. If it doesn't work, the next possibility is tried. Here it's xmlString8. You can create union with any kind of field you create, including dict and arrays.
|
||||
|
@ -67,7 +67,7 @@ public:
|
||||
class SlotClass : public XmlUInt64
|
||||
{
|
||||
using super = XmlUInt64;
|
||||
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override {
|
||||
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override {
|
||||
if ( !super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors) ) return false;
|
||||
if ( !isDefined() ) return xmlLiteParser->addWarning(generateErrors, S8Printf("Slot must be defined as a number between 0 and 15 inclusive at '%s:%d'", xmlPath.c_str(), keyPos.getLine()));
|
||||
if ( value() < 0 ) return xmlLiteParser->addWarning(generateErrors, S8Printf("Slot cannot be negative. It must a number between 0 and 15 inclusive at '%s:%d'", xmlPath.c_str(), keyPos.getLine()));
|
||||
@ -84,7 +84,7 @@ public:
|
||||
XmlString8AllowEmpty Serial = XmlString8AllowEmpty();
|
||||
class TypeClass: public XmlString8AllowEmpty {
|
||||
using super = XmlString8AllowEmpty;
|
||||
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override {
|
||||
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override {
|
||||
if ( !super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors) ) return false;
|
||||
if ( isDefined() ) {
|
||||
if ( xstring8.isEqualIC("DDR") ) return true;
|
||||
@ -109,7 +109,7 @@ public:
|
||||
|
||||
virtual void getFields(XmlDictField** fields, size_t* nb) override { *fields = m_fields; *nb = sizeof(m_fields)/sizeof(m_fields[0]); };
|
||||
|
||||
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override {
|
||||
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override {
|
||||
if ( !super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors) ) return false;
|
||||
if ( !Slot.isDefined() ) return false;
|
||||
return true;
|
||||
@ -136,7 +136,7 @@ public:
|
||||
// Cannot happen if validate has been done properly.
|
||||
panic("invalid value");
|
||||
}
|
||||
bool dgetInUse() const { return Size.isDefined() ? Size.value() > 0 : false; };
|
||||
XBool dgetInUse() const { return Size.isDefined() ? Size.value() > 0 : false; };
|
||||
|
||||
};
|
||||
|
||||
@ -168,9 +168,9 @@ public:
|
||||
|
||||
virtual void getFields(XmlDictField** fields, size_t* nb) override { *fields = m_fields; *nb = sizeof(m_fields)/sizeof(m_fields[0]); };
|
||||
|
||||
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override {
|
||||
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override {
|
||||
if ( !super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors) ) return false;
|
||||
bool b = true;
|
||||
XBool b = true;
|
||||
return b;
|
||||
}
|
||||
|
||||
@ -204,7 +204,7 @@ public:
|
||||
|
||||
class DeviceClass: public XmlString8AllowEmpty {
|
||||
using super = XmlString8AllowEmpty;
|
||||
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override {
|
||||
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override {
|
||||
if ( !super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors) ) return false;
|
||||
if ( isDefined() ) {
|
||||
if ( xstring8.isEqualIC("ATI") ) return true;
|
||||
@ -233,9 +233,9 @@ public:
|
||||
|
||||
virtual void getFields(XmlDictField** fields, size_t* nb) override { *fields = m_fields; *nb = sizeof(m_fields)/sizeof(m_fields[0]); };
|
||||
|
||||
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override {
|
||||
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override {
|
||||
if ( !super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors) ) return false;
|
||||
bool b = true;
|
||||
XBool b = true;
|
||||
return b;
|
||||
}
|
||||
const decltype(Device)::ValueType& dgetDevice() const { return Device.isDefined() ? Device.value() : Device.nullValue; };
|
||||
@ -307,7 +307,7 @@ public:
|
||||
{
|
||||
using super = XmlString8AllowEmpty;
|
||||
protected:
|
||||
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override {
|
||||
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override {
|
||||
if ( !super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors) ) return false;
|
||||
if ( !isDefined() ) return true;
|
||||
if ( !IsValidGuidString(xstring8) ) return xmlLiteParser->addWarning(generateErrors, S8Printf("Invalid SmUUID '%s' - should be in the format XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX in dict '%s:%d'", xstring8.c_str(), xmlPath.c_str(), keyPos.getLine()));
|
||||
@ -320,7 +320,7 @@ public:
|
||||
using super = XmlString8Trimed;
|
||||
public:
|
||||
ProductNameClass() : super(true) {};
|
||||
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override {
|
||||
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override {
|
||||
if ( !super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors) ) return false;
|
||||
if ( !isDefined() ) {
|
||||
xmlLiteParser->addError(generateErrors, S8Printf("You must define ProductName in SMBIOS dict, line %d", keyPos.getLine()));
|
||||
@ -410,7 +410,7 @@ public:
|
||||
virtual void getFields(XmlDictField** fields, size_t* nb) override { *fields = m_fields; *nb = sizeof(m_fields)/sizeof(m_fields[0]); };
|
||||
|
||||
|
||||
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override {
|
||||
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override {
|
||||
if ( !super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors) ) return false;
|
||||
if ( !ProductName.isDefined() ) {
|
||||
return xmlLiteParser->addWarning(generateErrors, S8Printf("ProductName is not defined, the whole SMBIOS dict is ignored at line %d.", keyPos.getLine()));
|
||||
@ -486,7 +486,7 @@ public:
|
||||
}
|
||||
return GetModelFromString(ProductName.value()); // ProductName has been validated, so Model CANNOT be MaxMachineType
|
||||
}
|
||||
bool hasModel() const { return ProductName.isDefined(); }
|
||||
XBool hasModel() const { return ProductName.isDefined(); }
|
||||
|
||||
MACHINE_TYPES dgetModel() const
|
||||
{
|
||||
@ -619,8 +619,8 @@ public:
|
||||
|
||||
decltype(SmbiosVersion)::ValueType dgetSmbiosVersion() const { return SmbiosVersion.isDefined() ? SmbiosVersion.value() : 0x204; };
|
||||
decltype(MemoryRank)::ValueType dgetAttribute() const { return MemoryRank.isDefined() ? MemoryRank.value() : -1; };
|
||||
decltype(Trust)::ValueType dgetTrustSMBIOS() const { return Trust.isDefined() ? Trust.value() : true; };
|
||||
bool dgetInjectMemoryTables() const { return Memory.Modules.isDefined() && Memory.Modules.size() > 0 ? Memory.dgetSlotCounts() > 0 : false; };
|
||||
decltype(Trust)::ValueType dgetTrustSMBIOS() const { return Trust.isDefined() ? Trust.value() : XBool(true); };
|
||||
XBool dgetInjectMemoryTables() const { return Memory.Modules.isDefined() && Memory.Modules.size() > 0 ? Memory.dgetSlotCounts() > 0 : false; };
|
||||
decltype(PlatformFeature)::ValueType dgetgPlatformFeature() const {
|
||||
if ( PlatformFeature.isDefined() ) return PlatformFeature.value();
|
||||
return GetPlatformFeature(dgetModel());
|
||||
|
@ -5,8 +5,8 @@
|
||||
* Author: jief
|
||||
*/
|
||||
|
||||
#include "../Settings/Self.h"
|
||||
#include <Platform.h>
|
||||
#include "../Settings/Self.h"
|
||||
#include "../refit/lib.h"
|
||||
|
||||
#ifndef DEBUG_ALL
|
||||
@ -21,7 +21,7 @@
|
||||
#define DBG(...) DebugLog(DEBUG_SELF, __VA_ARGS__)
|
||||
#endif
|
||||
|
||||
EFI_STATUS Self::__initialize(bool debugMsg, EFI_HANDLE SelfImageHandle, EFI_LOADED_IMAGE** SelfLoadedImagePtr, EFI_SIMPLE_FILE_SYSTEM_PROTOCOL** SelfSimpleVolumePtr, EFI_FILE** SelfVolumeRootDirPtr, XStringW* CloverDirFullPathPtr, XStringW* efiFileNamePtr, EFI_FILE** CloverDirPtr)
|
||||
EFI_STATUS Self::__initialize(XBool debugMsg, EFI_HANDLE SelfImageHandle, EFI_LOADED_IMAGE** SelfLoadedImagePtr, EFI_SIMPLE_FILE_SYSTEM_PROTOCOL** SelfSimpleVolumePtr, EFI_FILE** SelfVolumeRootDirPtr, XStringW* CloverDirFullPathPtr, XStringW* efiFileNamePtr, EFI_FILE** CloverDirPtr)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
|
||||
@ -131,7 +131,7 @@ Self self;
|
||||
|
||||
constexpr const LStringW THEMES_DIRNAME = L"Themes"_XSW;
|
||||
|
||||
EFI_STATUS Self::_openDir(const XStringW& path, bool* b, EFI_FILE** efiDir)
|
||||
EFI_STATUS Self::_openDir(const XStringW& path, XBool* b, EFI_FILE** efiDir)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
Status = m_CloverDir->Open(m_CloverDir, efiDir, path.wc_str(), EFI_FILE_MODE_READ, 0);
|
||||
|
@ -20,7 +20,7 @@ class Self
|
||||
{
|
||||
// Class method, usable even without any instance of Self.
|
||||
protected:
|
||||
static EFI_STATUS __initialize(bool 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);
|
||||
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);
|
||||
|
||||
@ -39,10 +39,10 @@ protected:
|
||||
XStringW m_CloverDirFullPath {}; // full path of folder containing this efi.
|
||||
XStringW m_CloverDirFullPath4Display {}; // prettier for diplay
|
||||
|
||||
bool m_ThemesDirExists {};
|
||||
XBool m_ThemesDirExists {};
|
||||
EFI_FILE *m_ThemesDir {};
|
||||
|
||||
EFI_STATUS _openDir(const XStringW& path, bool* b, EFI_FILE** efiDir);
|
||||
EFI_STATUS _openDir(const XStringW& path, XBool* b, EFI_FILE** efiDir);
|
||||
EFI_STATUS _initialize();
|
||||
|
||||
public:
|
||||
@ -56,7 +56,7 @@ public:
|
||||
EFI_STATUS reInitialize();
|
||||
void closeHandle();
|
||||
|
||||
bool isInitialized() const { return m_CloverDir != NULL; }
|
||||
XBool isInitialized() const { return m_CloverDir != NULL; }
|
||||
void checkInitialized() const
|
||||
{
|
||||
#ifdef DEBUG
|
||||
@ -80,7 +80,7 @@ public:
|
||||
const XStringW& getCloverDirFullPath() { checkInitialized(); return m_CloverDirFullPath; }
|
||||
const XStringW& getCloverDirFullPath4Display() { checkInitialized(); return m_CloverDirFullPath4Display; }
|
||||
|
||||
bool themesDirExists() { checkInitialized(); return m_ThemesDirExists; }
|
||||
XBool themesDirExists() { checkInitialized(); return m_ThemesDirExists; }
|
||||
const EFI_FILE& getThemesDir() { checkInitialized(); return *m_ThemesDir; }
|
||||
|
||||
};
|
||||
|
@ -30,7 +30,7 @@ constexpr const LStringW KEXTS_DIRNAME = L"Kexts"_XSW;
|
||||
SelfOem selfOem;
|
||||
|
||||
|
||||
//EFI_STATUS SelfOem::_openDir(const XStringW& path, bool* b, EFI_FILE** efiDir)
|
||||
//EFI_STATUS SelfOem::_openDir(const XStringW& path, XBool* b, EFI_FILE** efiDir)
|
||||
//{
|
||||
// EFI_STATUS Status;
|
||||
// Status = self.getCloverDir().Open(&self.getCloverDir(), efiDir, path.wc_str(), EFI_FILE_MODE_READ, 0);
|
||||
@ -45,7 +45,7 @@ SelfOem selfOem;
|
||||
//}
|
||||
|
||||
|
||||
bool SelfOem::_checkOEMPath()
|
||||
XBool SelfOem::_checkOEMPath()
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
|
||||
@ -74,7 +74,7 @@ bool SelfOem::_checkOEMPath()
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SelfOem::_setOemPathRelToSelfDir(bool isFirmwareClover, const XString8& OEMBoard, const XString8& OEMProduct, INT32 frequency, const XObjArray<LanCardClass>& lanCardArray)
|
||||
XBool SelfOem::_setOemPathRelToSelfDir(XBool isFirmwareClover, const XString8& OEMBoard, const XString8& OEMProduct, INT32 frequency, const XObjArray<LanCardClass>& lanCardArray)
|
||||
{
|
||||
for ( size_t idx = 0 ; idx < lanCardArray.size() ; ++idx ) {
|
||||
m_OemPathRelToSelfDir.SWPrintf("OEM\\%s--%02X-%02X-%02X-%02X-%02X-%02X", OEMProduct.c_str(), lanCardArray[idx].MacAddress[0], lanCardArray[idx].MacAddress[1], lanCardArray[idx].MacAddress[2], lanCardArray[idx].MacAddress[3], lanCardArray[idx].MacAddress[4], lanCardArray[idx].MacAddress[5]);
|
||||
@ -170,7 +170,7 @@ EFI_STATUS SelfOem::_initialize()
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
EFI_STATUS SelfOem::initialize(const XString8& confName, bool isFirmwareClover, const XString8& OEMBoard, const XString8& OEMProduct, INT32 frequency, const XObjArray<LanCardClass>& lanCardArray)
|
||||
EFI_STATUS SelfOem::initialize(const XString8& confName, XBool isFirmwareClover, const XString8& OEMBoard, const XString8& OEMProduct, INT32 frequency, const XObjArray<LanCardClass>& lanCardArray)
|
||||
{
|
||||
if ( m_ConfName.notEmpty() ) {
|
||||
log_technical_bug("%s : cannot be called twice. Use reinitialize.", __PRETTY_FUNCTION__);
|
||||
|
@ -16,7 +16,7 @@ class SelfOem
|
||||
protected:
|
||||
XString8 m_ConfName = NullXString8; // Initialisation required by -Weffc++. Couldn't use default ctor.
|
||||
|
||||
// bool m_OemDirExists;
|
||||
// XBool m_OemDirExists;
|
||||
EFI_FILE* m_OemDir = NULL;
|
||||
XStringW m_OemPathRelToSelfDir = NullXStringW;
|
||||
XStringW m_OemFulPath = NullXStringW;
|
||||
@ -29,9 +29,9 @@ protected:
|
||||
XStringW m_KextsPathRelToSelfDir = NullXStringW;
|
||||
XStringW m_KextsFullPath = NullXStringW;
|
||||
|
||||
// EFI_STATUS _openDir(const XStringW& path, bool* b, EFI_FILE** efiDir);
|
||||
bool _checkOEMPath();
|
||||
bool _setOemPathRelToSelfDir(bool isFirmwareClover, const XString8& OEMBoard, const XString8& OEMProduct, INT32 frequency, const XObjArray<LanCardClass>& lanCardArray);
|
||||
// EFI_STATUS _openDir(const XStringW& path, XBool* b, EFI_FILE** efiDir);
|
||||
XBool _checkOEMPath();
|
||||
XBool _setOemPathRelToSelfDir(XBool isFirmwareClover, const XString8& OEMBoard, const XString8& OEMProduct, INT32 frequency, const XObjArray<LanCardClass>& lanCardArray);
|
||||
EFI_STATUS _initialize();
|
||||
|
||||
public:
|
||||
@ -41,16 +41,16 @@ public:
|
||||
|
||||
~SelfOem () {};
|
||||
|
||||
EFI_STATUS initialize(const XString8& confName, bool isFirmwareClover, const XString8& OEMBoard, const XString8& OEMProduct, INT32 frequency, const XObjArray<LanCardClass>& lanCardArray);
|
||||
EFI_STATUS initialize(const XString8& confName, XBool isFirmwareClover, const XString8& OEMBoard, const XString8& OEMProduct, INT32 frequency, const XObjArray<LanCardClass>& lanCardArray);
|
||||
void unInitialize();
|
||||
EFI_STATUS reInitialize();
|
||||
void closeHandle();
|
||||
|
||||
bool isInitialized() const { return m_ConfName.notEmpty(); }
|
||||
XBool isInitialized() const { return m_ConfName.notEmpty(); }
|
||||
|
||||
const XString8& getConfName() { return m_ConfName; }
|
||||
|
||||
bool oemDirExists() { return m_OemPathRelToSelfDir.notEmpty(); }
|
||||
XBool oemDirExists() { return m_OemPathRelToSelfDir.notEmpty(); }
|
||||
const EFI_FILE& getOemDir() { assert(m_OemDir != NULL); return *m_OemDir; }
|
||||
const XStringW& getOemPathRelToSelfDir() { assert(m_OemPathRelToSelfDir.notEmpty()); return m_OemPathRelToSelfDir; }
|
||||
const XStringW& getOemFullPath() { assert(m_OemFulPath.notEmpty()); return m_OemFulPath; }
|
||||
@ -61,7 +61,7 @@ public:
|
||||
const XStringW& getConfigDirFullPath() { if ( m_OemDir != NULL ) return getOemFullPath(); return self.getCloverDirFullPath(); }
|
||||
|
||||
|
||||
bool isKextsDirFound() { return m_KextsDir != NULL; }
|
||||
XBool isKextsDirFound() { return m_KextsDir != NULL; }
|
||||
const EFI_FILE& getKextsDir() { assert(m_KextsDir != NULL); return *m_KextsDir; }
|
||||
const XStringW& getKextsDirPathRelToSelfDir() { assert(m_KextsPathRelToSelfDir.notEmpty()); return m_KextsPathRelToSelfDir; }
|
||||
const XStringW& getKextsFullPath() { assert(m_KextsFullPath.notEmpty()); return m_KextsFullPath; }
|
||||
|
@ -42,10 +42,10 @@ class XmlArray : public XmlAbstractType, public XObjArray<T>
|
||||
const ValueType& value() const { if ( !isDefined() ) panic("%s : value is not defined", __PRETTY_FUNCTION__); return *this; }
|
||||
// const ValueType& v() const { if ( !isDefined() ) panic("%s : value is not defined", __PRETTY_FUNCTION__); return *this; }
|
||||
|
||||
virtual bool isTheNextTag(XmlLiteParser* xmlLiteParser) override { return xmlLiteParser->nextTagIsOpeningTag("array"); }
|
||||
virtual bool parseFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, bool generateErrors) override;
|
||||
virtual XBool isTheNextTag(XmlLiteParser* xmlLiteParser) override { return xmlLiteParser->nextTagIsOpeningTag("array"); }
|
||||
virtual XBool parseFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, XBool generateErrors) override;
|
||||
// Validate remove invalid elements, but doesn't invalidate the whole array. So this is always returning true.
|
||||
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override;
|
||||
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override;
|
||||
};
|
||||
|
||||
|
||||
@ -54,7 +54,7 @@ const typename XmlArray<T>::ValueType XmlArray<T>::nullValue;
|
||||
|
||||
|
||||
template <class T>
|
||||
bool XmlArray<T>::parseFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, bool generateErrors)
|
||||
XBool XmlArray<T>::parseFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, XBool generateErrors)
|
||||
{
|
||||
WARNING_IF_DEFINED;
|
||||
RETURN_IF_FALSE ( xmlLiteParser->consumeOpeningTag("array") );
|
||||
@ -94,7 +94,7 @@ bool XmlArray<T>::parseFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8&
|
||||
}
|
||||
|
||||
template <class T>
|
||||
bool XmlArray<T>::validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& pos, bool generateErrors)
|
||||
XBool XmlArray<T>::validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& pos, XBool generateErrors)
|
||||
{
|
||||
for ( size_t idx = 0 ; idx < super2::size() ; ) {
|
||||
if ( !super2::ElementAt(idx).validate(xmlLiteParser, xmlPath, pos, generateErrors) ) {
|
||||
@ -119,18 +119,18 @@ class XmlString8Array : public XmlArray<XmlString8>
|
||||
const ValueType& value() const { if ( !isDefined() ) panic("%s : value is not defined", __PRETTY_FUNCTION__); return array; }
|
||||
|
||||
virtual void reset() override { super::reset(); array.setEmpty(); };
|
||||
virtual bool parseFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, bool generateErrors) override
|
||||
virtual XBool parseFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, XBool generateErrors) override
|
||||
{
|
||||
bool b = super::parseFromXmlLite(xmlLiteParser, xmlPath, generateErrors);
|
||||
XBool b = super::parseFromXmlLite(xmlLiteParser, xmlPath, generateErrors);
|
||||
for ( size_t idx = 0 ; idx < super::size() ; idx++ ) {
|
||||
array.AddReference(&super::ElementAt(idx).value(), false);
|
||||
}
|
||||
return b;
|
||||
}
|
||||
// Validate can remove invalid element. So we have to regenerate 'array'. There is no object copy, so it's very quick
|
||||
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override
|
||||
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override
|
||||
{
|
||||
bool b = super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors);
|
||||
XBool b = super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors);
|
||||
array.setEmpty();
|
||||
for ( size_t idx = 0 ; idx < super::size() ; idx++ ) {
|
||||
array.AddReference(&super::ElementAt(idx).value(), false);
|
||||
@ -155,23 +155,23 @@ class XmlStringWArray : public XmlArray<XmlStringW>
|
||||
const ValueType& value() const { if ( !isDefined() ) log_technical_bug("%s : value is not defined", __PRETTY_FUNCTION__); return array; }
|
||||
|
||||
virtual void reset() override { super::reset(); array.setEmpty(); };
|
||||
virtual bool parseFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, bool generateErrors) override
|
||||
virtual XBool parseFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, XBool generateErrors) override
|
||||
{
|
||||
#ifdef JIEF_DEBUG
|
||||
if (xmlPath == "/DisableDrivers"_XS8) {
|
||||
NOP;
|
||||
}
|
||||
#endif
|
||||
bool b = super::parseFromXmlLite(xmlLiteParser, xmlPath, generateErrors);
|
||||
XBool b = super::parseFromXmlLite(xmlLiteParser, xmlPath, generateErrors);
|
||||
array.setEmpty();
|
||||
for ( size_t idx = 0 ; idx < super::size() ; idx++ ) {
|
||||
array.AddReference(&super::ElementAt(idx).value(), false);
|
||||
}
|
||||
return b;
|
||||
}
|
||||
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override
|
||||
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override
|
||||
{
|
||||
bool b = super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors);
|
||||
XBool b = super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors);
|
||||
// Validate can remove invalid element. So we have to regenerate 'array'. There is no object copy, so it's very quick
|
||||
array.setEmpty();
|
||||
for ( size_t idx = 0 ; idx < super::size() ; idx++ ) {
|
||||
|
@ -24,7 +24,7 @@
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//bool XmlComposite::isTheNextTag(XmlLiteParser* xmlLiteParser)
|
||||
//XBool XmlComposite::isTheNextTag(XmlLiteParser* xmlLiteParser)
|
||||
//{
|
||||
// XmlCompositeField* fields;
|
||||
// size_t nb;
|
||||
@ -39,7 +39,7 @@
|
||||
// return false;
|
||||
//}
|
||||
//
|
||||
//bool XmlComposite::parseFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, bool generateErrors)
|
||||
//XBool XmlComposite::parseFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, XBool generateErrors)
|
||||
//{
|
||||
// XmlCompositeField* fields;
|
||||
// size_t nb;
|
||||
@ -65,7 +65,7 @@
|
||||
//}
|
||||
//
|
||||
//
|
||||
//bool XmlComposite::validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& pos, bool generateErrors)
|
||||
//XBool XmlComposite::validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& pos, XBool generateErrors)
|
||||
//{
|
||||
// XmlCompositeField* fields;
|
||||
// size_t nb;
|
||||
|
@ -55,9 +55,9 @@
|
||||
//
|
||||
// virtual void reset() override;
|
||||
//
|
||||
// virtual bool isTheNextTag(XmlLiteParser* xmlLiteParser) override;
|
||||
// virtual bool parseFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, bool generateErrors) override;
|
||||
// virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override;
|
||||
// virtual XBool isTheNextTag(XmlLiteParser* xmlLiteParser) override;
|
||||
// virtual XBool parseFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, XBool generateErrors) override;
|
||||
// virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override;
|
||||
//};
|
||||
//
|
||||
//
|
||||
@ -77,7 +77,7 @@
|
||||
// virtual void getFields(XmlCompositeField** fields, size_t* nb) override { *fields = m_fields; *nb = sizeof(m_fields)/sizeof(m_fields[0]); };
|
||||
//
|
||||
// // Super class parseFromXmlLite would be fine, execpt for the calculation of xmlPath
|
||||
// virtual bool parseFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, bool generateErrors) override
|
||||
// virtual XBool parseFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, XBool generateErrors) override
|
||||
// {
|
||||
// if ( !xmlKey.parseFromXmlLite(xmlLiteParser, xmlPath, generateErrors) ) return false;
|
||||
// if ( !xmlValue.parseFromXmlLite(xmlLiteParser, S8Printf("%s/%s", xmlPath.c_str(), xmlKey.xstring8.c_str()), generateErrors) ) return false;
|
||||
|
@ -29,7 +29,7 @@ void XmlDict::reset()
|
||||
/*
|
||||
* Try to parse the tag following a key in a dict
|
||||
*/
|
||||
XmlAbstractType& XmlDict::parseValueFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, bool generateErrors, const XmlParserPosition &keyPos, const char *keyValue, size_t keyValueLength, bool* keyFound)
|
||||
XmlAbstractType& XmlDict::parseValueFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, XBool generateErrors, const XmlParserPosition &keyPos, const char *keyValue, size_t keyValueLength, XBool* keyFound)
|
||||
{
|
||||
XmlDictField* fields;
|
||||
size_t nb;
|
||||
@ -88,7 +88,7 @@ if ( strcmp(fieldName, "AutoMerge") == 0 ) {
|
||||
return nullXmlType;
|
||||
}
|
||||
|
||||
XmlAbstractType& XmlDict::parseKeyAndValueFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, bool generateErrors, const char** keyValuePtr,
|
||||
XmlAbstractType& XmlDict::parseKeyAndValueFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, XBool generateErrors, const char** keyValuePtr,
|
||||
size_t* keyValueLengthPtr)
|
||||
{
|
||||
const char*& keyValue = *keyValuePtr;
|
||||
@ -114,7 +114,7 @@ size_t* keyValueLengthPtr)
|
||||
//XmlParserPosition valuePos = xmlLiteParser->getPosition();
|
||||
//#endif
|
||||
|
||||
bool keyFound;
|
||||
XBool keyFound;
|
||||
XmlAbstractType& xmlAbstractType = parseValueFromXmlLite(xmlLiteParser, xmlSubPath, generateErrors, keyPos, keyValue, keyValueLength, &keyFound);
|
||||
|
||||
if ( !keyFound ) {
|
||||
@ -137,7 +137,7 @@ size_t* keyValueLengthPtr)
|
||||
return xmlAbstractType;
|
||||
}
|
||||
|
||||
bool XmlDict::parseFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, bool generateErrors)
|
||||
XBool XmlDict::parseFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, XBool generateErrors)
|
||||
{
|
||||
WARNING_IF_DEFINED;
|
||||
|
||||
@ -158,7 +158,7 @@ bool XmlDict::parseFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8& xml
|
||||
XmlParserPosition valuePos = xmlLiteParser->getPosition();
|
||||
(void)valuePos;
|
||||
#endif
|
||||
// bool keyFound;
|
||||
// XBool keyFound;
|
||||
// XmlAbstractType& xmlAbstractType = parseValueFromXmlLite(xmlLiteParser, xmlSubPath, generateErrors, keyPos, keyValue, keyValueLength, &keyFound);
|
||||
|
||||
XmlParserPosition keyPos = xmlLiteParser->getPosition();
|
||||
@ -177,7 +177,7 @@ XmlParserPosition valuePos = xmlLiteParser->getPosition();
|
||||
if ( xmlAbstractType.isDefined() )
|
||||
{
|
||||
XString8 xmlSubPath = xmlPath.lastChar() == '/' ? S8Printf("%s%.*s", xmlPath.c_str(), (int)keyValueLength, keyValue) : S8Printf("%s/%.*s", xmlPath.c_str(), (int)keyValueLength, keyValue);
|
||||
bool validated = xmlAbstractType.validate(xmlLiteParser, xmlSubPath, keyPos, generateErrors);
|
||||
XBool validated = xmlAbstractType.validate(xmlLiteParser, xmlSubPath, keyPos, generateErrors);
|
||||
if ( !validated ) xmlAbstractType.reset();
|
||||
}else{
|
||||
if ( xmlLiteParser->getPosition() == beforePos ) {
|
||||
@ -198,7 +198,7 @@ XmlParserPosition valuePos = xmlLiteParser->getPosition();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool XmlDict::validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& pos, bool generateErrors)
|
||||
XBool XmlDict::validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& pos, XBool generateErrors)
|
||||
{
|
||||
(void)xmlLiteParser;
|
||||
(void)xmlPath;
|
||||
|
@ -38,13 +38,13 @@ public:
|
||||
|
||||
virtual void getFields(XmlDictField** fields, size_t* nb) { *fields = NULL; *nb = 0; };
|
||||
|
||||
virtual bool isTheNextTag(XmlLiteParser* xmlLiteParser) override { return xmlLiteParser->nextTagIsOpeningTag("dict"); }
|
||||
virtual XBool isTheNextTag(XmlLiteParser* xmlLiteParser) override { return xmlLiteParser->nextTagIsOpeningTag("dict"); }
|
||||
|
||||
virtual XmlAbstractType& parseValueFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, bool generateErrors, const XmlParserPosition &keyPos, const char *keyValue, size_t keyValueLength, bool* keyFound);
|
||||
virtual XmlAbstractType& parseKeyAndValueFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, bool generateErrors, const char** keyValuePtr, size_t* keyValueLengthPtr);
|
||||
virtual bool parseFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, bool generateErrors) override;
|
||||
virtual XmlAbstractType& parseValueFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, XBool generateErrors, const XmlParserPosition &keyPos, const char *keyValue, size_t keyValueLength, XBool* keyFound);
|
||||
virtual XmlAbstractType& parseKeyAndValueFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, XBool generateErrors, const char** keyValuePtr, size_t* keyValueLengthPtr);
|
||||
virtual XBool parseFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, XBool generateErrors) override;
|
||||
|
||||
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override;
|
||||
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override;
|
||||
};
|
||||
|
||||
|
||||
@ -93,7 +93,7 @@ protected:
|
||||
XmlKeyType keyTmp = XmlKeyType();
|
||||
ValueArrayType m_valueArray = ValueArrayType();
|
||||
public:
|
||||
bool ignoreCommented = true;
|
||||
XBool ignoreCommented = true;
|
||||
|
||||
_XmlRepeatingDict() : super() {};
|
||||
~_XmlRepeatingDict() {};
|
||||
@ -109,18 +109,18 @@ public:
|
||||
|
||||
virtual void getFields(XmlDictField** fields, size_t* nb) { panic("BUG : repeating dict don't use getFields()"); };
|
||||
|
||||
virtual bool isTheNextTag(XmlLiteParser* xmlLiteParser) override { return xmlLiteParser->nextTagIsOpeningTag("dict"); }
|
||||
virtual XBool isTheNextTag(XmlLiteParser* xmlLiteParser) override { return xmlLiteParser->nextTagIsOpeningTag("dict"); }
|
||||
|
||||
// virtual XmlAbstractType& parseValueFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, bool generateErrors, const XmlParserPosition &keyPos, const char *keyValue, size_t keyValueLength, bool* keyFound);
|
||||
virtual XmlValueType* parseKeyAndValueFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, bool generateErrors);
|
||||
virtual bool parseFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, bool generateErrors) override;
|
||||
// virtual XmlAbstractType& parseValueFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, XBool generateErrors, const XmlParserPosition &keyPos, const char *keyValue, size_t keyValueLength, XBool* keyFound);
|
||||
virtual XmlValueType* parseKeyAndValueFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, XBool generateErrors);
|
||||
virtual XBool parseFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, XBool generateErrors) override;
|
||||
|
||||
// virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override;
|
||||
// virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override;
|
||||
};
|
||||
|
||||
|
||||
template<class XmlKeyType, class XmlValueType, class ValueType>
|
||||
XmlValueType* _XmlRepeatingDict<XmlKeyType, XmlValueType, ValueType>::parseKeyAndValueFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, bool generateErrors)
|
||||
XmlValueType* _XmlRepeatingDict<XmlKeyType, XmlValueType, ValueType>::parseKeyAndValueFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, XBool generateErrors)
|
||||
{
|
||||
keyTmp.reset();
|
||||
if ( keyTmp.parseFromXmlLite(xmlLiteParser, xmlPath, generateErrors) ) {
|
||||
@ -150,7 +150,7 @@ XmlValueType* _XmlRepeatingDict<XmlKeyType, XmlValueType, ValueType>::parseKeyAn
|
||||
}
|
||||
|
||||
template<class XmlKeyType, class XmlValueType, class ValueType>
|
||||
bool _XmlRepeatingDict<XmlKeyType, XmlValueType, ValueType>::parseFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, bool generateErrors)
|
||||
XBool _XmlRepeatingDict<XmlKeyType, XmlValueType, ValueType>::parseFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, XBool generateErrors)
|
||||
{
|
||||
WARNING_IF_DEFINED;
|
||||
|
||||
@ -179,7 +179,7 @@ if ( xmlPath.startWithOrEqualToIC("/Devices/Properties"_XS8) ) {
|
||||
XmlParserPosition valuePos = xmlLiteParser->getPosition();
|
||||
(void)valuePos;
|
||||
#endif
|
||||
// bool keyFound;
|
||||
// XBool keyFound;
|
||||
// XmlAbstractType& xmlAbstractType = parseValueFromXmlLite(xmlLiteParser, xmlSubPath, generateErrors, keyPos, keyValue, keyValueLength, &keyFound);
|
||||
|
||||
XmlParserPosition keyPos = xmlLiteParser->getPosition();
|
||||
@ -199,7 +199,7 @@ XmlParserPosition valuePos = xmlLiteParser->getPosition();
|
||||
if ( xmlValueType != NULL )
|
||||
{
|
||||
if ( !xmlValueType->isDefined() ) panic("BUG: parseKeyAndValueFromXmlLite must not return an undefined item");
|
||||
bool validated = xmlValueType->validate(xmlLiteParser, S8Printf("%s/%s", xmlPath.c_str(), keyTmp.value().c_str()), keyPos, generateErrors);
|
||||
XBool validated = xmlValueType->validate(xmlLiteParser, S8Printf("%s/%s", xmlPath.c_str(), keyTmp.value().c_str()), keyPos, generateErrors);
|
||||
if ( validated ) {
|
||||
xmlValueType->setKey(keyTmp);
|
||||
addValue(xmlValueType);
|
||||
@ -349,9 +349,9 @@ class XmlRepeatingDict<XmlAddKey<XmkKeyType, XmlValueType>> : public _XmlRepeati
|
||||
// const typename XmlClass::ValueType& value() const { return super::value(); }
|
||||
//
|
||||
//// template<class OtherXStringArrayClass>
|
||||
//// bool operator ==(const OtherXStringArrayClass &aXStrings) const { return super::operator ==(aXStrings); }
|
||||
//// XBool operator ==(const OtherXStringArrayClass &aXStrings) const { return super::operator ==(aXStrings); }
|
||||
//// template<class OtherXStringArrayClass>
|
||||
//// bool operator !=(const OtherXStringArrayClass &aXStrings) const { return super::operator !=(aXStrings); }
|
||||
//// XBool operator !=(const OtherXStringArrayClass &aXStrings) const { return super::operator !=(aXStrings); }
|
||||
//
|
||||
//};
|
||||
//
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user