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
}\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