MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / SetOEMPath

Function SetOEMPath

rEFIt_UEFI/refit/main.cpp:1733–1750  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1731}
1732
1733VOID SetOEMPath(const XStringW& ConfName)
1734 {
1735 OEMPath.takeValueFrom("EFI\\CLOVER");
1736 if ( ConfName.isEmpty() ) {
1737 DBG("set OEMPath (ConfName == NULL): %ls\n", OEMPath.wc_str());
1738 } else if ( nLanCards > 0 && SetOEMPathIfExists(SelfRootDir, SWPrintf("EFI\\CLOVER\\OEM\\%s--%02X-%02X-%02X-%02X-%02X-%02X", gSettings.OEMProduct.c_str(), gLanMac[0][0], gLanMac[0][1], gLanMac[0][2], gLanMac[0][3], gLanMac[0][4], gLanMac[0][5]), ConfName)) {
1739 } else if ( nLanCards > 1 && SetOEMPathIfExists(SelfRootDir, SWPrintf("EFI\\CLOVER\\OEM\\%s--%02X-%02X-%02X-%02X-%02X-%02X", gSettings.OEMProduct.c_str(), gLanMac[1][0], gLanMac[1][1], gLanMac[1][2], gLanMac[1][3], gLanMac[1][4], gLanMac[1][5]), ConfName)) {
1740 } else if ( nLanCards > 2 && SetOEMPathIfExists(SelfRootDir, SWPrintf("EFI\\CLOVER\\OEM\\%s--%02X-%02X-%02X-%02X-%02X-%02X", gSettings.OEMProduct.c_str(), gLanMac[2][0], gLanMac[2][1], gLanMac[2][2], gLanMac[2][3], gLanMac[2][4], gLanMac[2][5]), ConfName)) {
1741 } else if ( nLanCards > 3 && SetOEMPathIfExists(SelfRootDir, SWPrintf("EFI\\CLOVER\\OEM\\%s--%02X-%02X-%02X-%02X-%02X-%02X", gSettings.OEMProduct.c_str(), gLanMac[3][0], gLanMac[3][1], gLanMac[3][2], gLanMac[3][3], gLanMac[3][4], gLanMac[3][5]), ConfName)) {
1742 } else if (!gFirmwareClover && SetOEMPathIfExists(SelfRootDir, SWPrintf("EFI\\CLOVER\\OEM\\%s\\UEFI", gSettings.OEMBoard.c_str()), ConfName)) {
1743 } else if (SetOEMPathIfExists(SelfRootDir, SWPrintf("EFI\\CLOVER\\OEM\\%s", gSettings.OEMProduct.c_str()), ConfName)) {
1744 } else if (SetOEMPathIfExists(SelfRootDir, SWPrintf("EFI\\CLOVER\\OEM\\%s-%d", gSettings.OEMProduct.c_str(), (INT32)(DivU64x32(gCPUStructure.CPUFrequency, Mega))), ConfName)) {
1745 } else if (SetOEMPathIfExists(SelfRootDir, SWPrintf("EFI\\CLOVER\\OEM\\%s", gSettings.OEMBoard.c_str()), ConfName)) {
1746 } else if (SetOEMPathIfExists(SelfRootDir, SWPrintf("EFI\\CLOVER\\OEM\\%s-%d", gSettings.OEMBoard.c_str(), (INT32)(DivU64x32(gCPUStructure.CPUFrequency, Mega))), ConfName) ) {
1747 } else {
1748 DBG("set OEMPath by default: %ls\n", OEMPath.wc_str());
1749 }
1750 }
1751
1752
1753#ifdef DEBUG_CLOVER

Callers 1

RefitMainFunction · 0.85

Calls 6

SetOEMPathIfExistsFunction · 0.85
SWPrintfFunction · 0.85
DivU64x32Function · 0.85
isEmptyMethod · 0.45
wc_strMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected