| 773 | } |
| 774 | |
| 775 | VOID |
| 776 | CVfrCompiler::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 | |
| 802 | Fail: |
| 803 | if (!IS_RUN_STATUS(STATUS_DEAD)) { |
| 804 | SET_RUN_STATUS (STATUS_FAILED); |
| 805 | } |
| 806 | } |
| 807 | |
| 808 | static const char *gSourceFileHeader[] = { |
| 809 | "//", |
no test coverage detected