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

Method GenCFile

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

Source from the content-addressed store, hash-verified

815};
816
817VOID
818CVfrCompiler::GenCFile (
819 VOID
820 )
821{
822 FILE *pFile;
823 UINT32 Index;
824
825 if (!IS_RUN_STATUS(STATUS_GENBINARY)) {
826 goto Fail;
827 }
828
829 if (!mOptions.CreateIfrPkgFile) {
830 if ((pFile = fopen (LongFilePath (mOptions.COutputFileName), "w")) == NULL) {
831 DebugError (NULL, 0, 0001, "Error opening output C file", "%s", mOptions.COutputFileName);
832 goto Fail;
833 }
834
835 for (Index = 0; gSourceFileHeader[Index] != NULL; Index++) {
836 fprintf (pFile, "%s\n", gSourceFileHeader[Index]);
837 }
838
839 if (gCFormPkg.GenCFile (mOptions.VfrBaseFileName, pFile, &gRBuffer) != VFR_RETURN_SUCCESS) {
840 fclose (pFile);
841 goto Fail;
842 }
843 fclose (pFile);
844 }
845
846 SET_RUN_STATUS (STATUS_FINISHED);
847 return;
848
849Fail:
850 if (!IS_RUN_STATUS(STATUS_DEAD)) {
851 SET_RUN_STATUS (STATUS_FAILED);
852 }
853}
854
855VOID
856CVfrCompiler::GenRecordListFile (

Callers 1

mainFunction · 0.45

Calls 4

fopenFunction · 0.85
fprintfFunction · 0.85
fcloseFunction · 0.85
LongFilePathFunction · 0.50

Tested by

no test coverage detected