summaryrefslogtreecommitdiff
path: root/ShellPkg/Library/UefiShellCEntryLib
diff options
context:
space:
mode:
authorjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2009-06-17 08:02:21 +0000
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2009-06-17 08:02:21 +0000
commit39157531c836143b1da4a90dd686160bc3f6d197 (patch)
tree2366a105ded6e04f87f30a6c6c430a0993e2a1da /ShellPkg/Library/UefiShellCEntryLib
parent05db8d5506fce2805205b573e9bbc25c62eff9d5 (diff)
downloadedk2-platforms-39157531c836143b1da4a90dd686160bc3f6d197.tar.xz
Fix build of ShellC Lib/App for GCC.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8582 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg/Library/UefiShellCEntryLib')
-rw-r--r--ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.c38
1 files changed, 29 insertions, 9 deletions
diff --git a/ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.c b/ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.c
index 0ce5271f22..19ade44563 100644
--- a/ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.c
+++ b/ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.c
@@ -20,19 +20,33 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Library/DebugLib.h>
-INT32
+INTN
EFIAPI
-main(
- UINTN Argc,
- CHAR16 **Argv
-);
+ShellAppMain (
+ IN INTN Argc,
+ IN CHAR16 **Argv
+ );
+/**
+ UEFI entry point for an application that will in turn call a C
+ style ShellAppMain function.
+
+ This application must have a function defined as follows:
+
+ INTN
+ EFIAPI
+ ShellAppMain (
+ IN INTN Argc,
+ IN CHAR16 **Argv
+ );
+**/
EFI_STATUS
EFIAPI
-ShellCEntryLib(
+ShellCEntryLib (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
- ){
+ )
+{
INT32 ReturnFromMain;
EFI_SHELL_PARAMETERS_PROTOCOL *EfiShellParametersProtocol;
EFI_SHELL_INTERFACE *EfiShellInterface;
@@ -53,7 +67,10 @@ ShellCEntryLib(
//
// use shell 2.0 interface
//
- ReturnFromMain = main(EfiShellInterface->Argc, EfiShellInterface->Argv);
+ ReturnFromMain = ShellAppMain (
+ EfiShellInterface->Argc,
+ EfiShellInterface->Argv
+ );
} else {
//
// try to get shell 1.0 interface instead.
@@ -69,7 +86,10 @@ ShellCEntryLib(
//
// use shell 1.0 interface
//
- ReturnFromMain = main(EfiShellParametersProtocol->Argc, EfiShellParametersProtocol->Argv);
+ ReturnFromMain = ShellAppMain (
+ EfiShellParametersProtocol->Argc,
+ EfiShellParametersProtocol->Argv
+ );
} else {
ASSERT(FALSE);
}