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

Function CombinePath

BaseTools/Source/C/VolInfo/VolInfo.c:1597–1625  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1595}
1596
1597EFI_STATUS
1598CombinePath (
1599 IN CHAR8* DefaultPath,
1600 IN CHAR8* AppendPath,
1601 OUT CHAR8* NewPath
1602)
1603{
1604 UINT32 DefaultPathLen;
1605 UINT64 Index;
1606 CHAR8 QuotesStr[] = "\"";
1607 strcpy(NewPath, QuotesStr);
1608 DefaultPathLen = strlen(DefaultPath);
1609 strcat(NewPath, DefaultPath);
1610 Index = 0;
1611 for (; Index < DefaultPathLen + 1; Index ++) {
1612 if (NewPath[Index] == '\\' || NewPath[Index] == '/') {
1613 if (NewPath[Index + 1] != '\0') {
1614 NewPath[Index] = '/';
1615 }
1616 }
1617 }
1618 if (NewPath[Index -1] != '/') {
1619 NewPath[Index] = '/';
1620 NewPath[Index + 1] = '\0';
1621 }
1622 strcat(NewPath, AppendPath);
1623 strcat(NewPath, QuotesStr);
1624 return EFI_SUCCESS;
1625}
1626
1627EFI_STATUS
1628ParseSection (

Callers 1

mainFunction · 0.85

Calls 3

strcatFunction · 0.85
strcpyFunction · 0.50
strlenFunction · 0.50

Tested by

no test coverage detected