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

Method GenBinary

BaseTools/Source/C/VfrCompile/VfrCompiler.cpp:775–806  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

773}
774
775VOID
776CVfrCompiler::GenBinary (
777 VOID
778 )
779{
780 FILE *pFile = NULL;
781
782 if (!IS_RUN_STATUS(STATUS_COMPILEED)) {
783 goto Fail;
784 }
785
786 if (mOptions.CreateIfrPkgFile == TRUE) {
787 if ((pFile = fopen (LongFilePath (mOptions.PkgOutputFileName), "wb")) == NULL) {
788 DebugError (NULL, 0, 0001, "Error opening file", "%s", mOptions.PkgOutputFileName);
789 goto Fail;
790 }
791 if (gCFormPkg.BuildPkg (pFile, &gRBuffer) != VFR_RETURN_SUCCESS) {
792 fclose (pFile);
793 goto Fail;
794 }
795 fclose (pFile);
796 }
797
798 SET_RUN_STATUS (STATUS_GENBINARY);
799
800 return;
801
802Fail:
803 if (!IS_RUN_STATUS(STATUS_DEAD)) {
804 SET_RUN_STATUS (STATUS_FAILED);
805 }
806}
807
808static const char *gSourceFileHeader[] = {
809 "//",

Callers 1

mainFunction · 0.80

Calls 4

fopenFunction · 0.85
fcloseFunction · 0.85
BuildPkgMethod · 0.80
LongFilePathFunction · 0.50

Tested by

no test coverage detected