]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Remove the generation of "Exit" function calling since the UefiApplicationLib has...
authorjwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 26 Mar 2007 09:30:32 +0000 (09:30 +0000)
committerjwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 26 Mar 2007 09:30:32 +0000 (09:30 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2506 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Java/Source/GenBuild/org/tianocore/build/autogen/AutoGen.java

index b1414a7c75be072b7c0a81766caaddc677db018f..192c36f2e8272f86854b521bcc501e63853b8ee6 100644 (file)
@@ -1100,7 +1100,11 @@ public class AutoGen {
                         if (!entryPointList[i].equals("")) {\r
                             fileBuffer.append("  if (SetJump (&mJumpContext) == 0) {\r\n");\r
                             fileBuffer.append(String.format("    " + debugStr, entryPointList[i], entryPointList[i]));\r
-                            fileBuffer.append("    ExitDriver (");\r
+                            if (CommonDefinition.getModuleType(typeStr) == CommonDefinition.ModuleTypeUefiApplication) {\r
+                                fileBuffer.append("    Exit (");\r
+                            } else {\r
+                                fileBuffer.append("    ExitDriver (");\r
+                            }\r
                             fileBuffer.append(entryPointList[i]);\r
                             fileBuffer.append(" (ImageHandle, SystemTable));\r\n");\r
                             fileBuffer.append("    ASSERT (FALSE);\r\n");\r
@@ -1113,25 +1117,27 @@ public class AutoGen {
                 }\r
                 fileBuffer.append("}\r\n\r\n");\r
 \r
-                fileBuffer.append("VOID\r\n");\r
-                fileBuffer.append("EFIAPI\r\n");\r
-                fileBuffer.append("ExitDriver (\r\n");\r
-                fileBuffer.append("  IN EFI_STATUS  Status\r\n");\r
-                fileBuffer.append("  )\r\n\r\n");\r
-                fileBuffer.append("{\r\n");\r
-                if (entryPointCount <= 1) {\r
-                    fileBuffer.append("  if (EFI_ERROR (Status)) {\r\n");\r
-                    fileBuffer.append("    ProcessLibraryDestructorList (gImageHandle, gST);\r\n");\r
-                    fileBuffer.append("  }\r\n");\r
-                    fileBuffer.append("  gBS->Exit (gImageHandle, Status, 0, NULL);\r\n");\r
-                } else {\r
-                    fileBuffer.append("  if (!EFI_ERROR (Status) || EFI_ERROR (mDriverEntryPointStatus)) {\r\n");\r
-                    fileBuffer.append("    mDriverEntryPointStatus = Status;\r\n");\r
-                    fileBuffer.append("  }\r\n");\r
-                    fileBuffer.append("  LongJump (&mJumpContext, (UINTN)-1);\r\n");\r
-                    fileBuffer.append("  ASSERT (FALSE);\r\n");\r
+                if (CommonDefinition.getModuleType(typeStr) != CommonDefinition.ModuleTypeUefiApplication) {\r
+                    fileBuffer.append("VOID\r\n");\r
+                    fileBuffer.append("EFIAPI\r\n");\r
+                    fileBuffer.append("ExitDriver (\r\n");\r
+                    fileBuffer.append("  IN EFI_STATUS  Status\r\n");\r
+                    fileBuffer.append("  )\r\n\r\n");\r
+                    fileBuffer.append("{\r\n");\r
+                    if (entryPointCount <= 1) {\r
+                        fileBuffer.append("  if (EFI_ERROR (Status)) {\r\n");\r
+                        fileBuffer.append("    ProcessLibraryDestructorList (gImageHandle, gST);\r\n");\r
+                        fileBuffer.append("  }\r\n");\r
+                        fileBuffer.append("  gBS->Exit (gImageHandle, Status, 0, NULL);\r\n");\r
+                    } else {\r
+                        fileBuffer.append("  if (!EFI_ERROR (Status) || EFI_ERROR (mDriverEntryPointStatus)) {\r\n");\r
+                        fileBuffer.append("    mDriverEntryPointStatus = Status;\r\n");\r
+                        fileBuffer.append("  }\r\n");\r
+                        fileBuffer.append("  LongJump (&mJumpContext, (UINTN)-1);\r\n");\r
+                        fileBuffer.append("  ASSERT (FALSE);\r\n");\r
+                    }\r
+                    fileBuffer.append("}\r\n\r\n");\r
                 }\r
-                fileBuffer.append("}\r\n\r\n");\r
             }\r
 \r
             if (CommonDefinition.getModuleType(typeStr) == CommonDefinition.ModuleTypeUefiApplication) {\r