if (enableMemoryUiPatching | enablePciUiPatching) {
// Rename existing values to invalid ones to avoid matching.
if (strcmp(di.modelIdentifier, "MacPro7,1") == 0) {
// on 13.0 MacPro7,1 string literal is inlined, but "MacPro7," will do the matching.
modelFindPatch = "MacPro7,";
modelReplPatch = "HacPro7,";
// partial matching, thus exclude '\0'.
modelFindSize = sizeof("MacPro7,") - 1;
DBGLOG("rev", "detected MP71");
} else if (strncmp(di.modelIdentifier, "MacBookAir", strlen("MacBookAir")) == 0) {
needsMemPatch = true;
modelFindPatch = "MacBookAir";
modelReplPatch = "HacBookAir";
modelFindSize = sizeof("MacBookAir");
DBGLOG("rev", "detected MBA");
} else if (strncmp(di.modelIdentifier, "MacBookPro10", strlen("MacBookPro10")) == 0) {
needsMemPatch = true;
modelFindPatch = "MacBookPro10";
modelReplPatch = "HacBookPro10";
modelFindSize = sizeof("MacBookPro10");
DBGLOG("rev", "detected MBP10");
}
if (modelFindPatch != nullptr) {
binPathSystemInformation = getKernelVersion() >= KernelVersion::Catalina ? binPathSystemInformationCatalina : binPathSystemInformationLegacy;
}
}