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

Function SetOEMPathIfExists

rEFIt_UEFI/refit/main.cpp:1713–1731  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1711extern UINTN nLanPaths; // number of LAN pathes
1712
1713BOOLEAN SetOEMPathIfExists(IN EFI_FILE *Root, const XStringW& path, const XStringW& ConfName)
1714{
1715 BOOLEAN res = FileExists(Root, path);
1716 if ( res ) {
1717 CHAR16 ConfigPath[1024];
1718 snwprintf(ConfigPath, sizeof(ConfigPath), "%ls\\%ls.plist", path.wc_str(), ConfName.wc_str());
1719 BOOLEAN res2 = FileExists(Root, ConfigPath);
1720 if ( res2 ) {
1721 OEMPath = path;
1722 DBG("CheckOEMPathExists: set OEMPath: %ls\n", OEMPath.wc_str());
1723 return 1;
1724 }else{
1725 DBG("CheckOEMPathExists tried %ls. '%ls.plist' not exists in dir\n", path.wc_str(), ConfName.wc_str());
1726 }
1727 }else{
1728 DBG("CheckOEMPathExists tried %ls. Dir does not exist\n", path.wc_str());
1729 }
1730 return 0;
1731}
1732
1733VOID SetOEMPath(const XStringW& ConfName)
1734 {

Callers 1

SetOEMPathFunction · 0.85

Calls 2

FileExistsFunction · 0.85
wc_strMethod · 0.45

Tested by

no test coverage detected