]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Fix build of ShellC Lib/App for GCC.
authorjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 17 Jun 2009 08:02:21 +0000 (08:02 +0000)
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 17 Jun 2009 08:02:21 +0000 (08:02 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8582 6f19259b-4bc3-4df7-8a09-765794883524

ShellPkg/Application/ShellCTestApp/ShellCTestApp.c
ShellPkg/Include/Library/ShellCEntryLib.h [deleted file]
ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.c

index 8e771afaebbfdad94492801b4b2bfbc3ad761dd9..44f50790c0c38676a087beefa13f67c7a64d5142 100644 (file)
 #include <Library/UefiLib.h>\r
 #include <Library/DebugLib.h>\r
 \r
-INT32 \r
+INTN \r
 EFIAPI \r
-main(\r
-  UINTN Argc, \r
-  CHAR16 **Argv\r
-  ){\r
-  Print(L"Test Complete\r\n");\r
+ShellAppMain (\r
+  IN INTN Argc, \r
+  IN CHAR16 **Argv\r
+  )\r
+{\r
+  INTN Index;\r
+\r
+  Print(L"ShellCTestApp.c:ShellAppMain called with %d parameters\n", Argc);\r
+  for (Index = 0; Index < Argc; Index++) {\r
+    Print(L"Argv[%d]: %s\n", Index, Argv[Index]);\r
+  }\r
+\r
+  return 0;\r
 }
\ No newline at end of file
diff --git a/ShellPkg/Include/Library/ShellCEntryLib.h b/ShellPkg/Include/Library/ShellCEntryLib.h
deleted file mode 100644 (file)
index 136fd0e..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/** @file\r
-  Provides application point extension for "C" style main funciton \r
-\r
-Copyright (c) 2006 - 2009, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution.  The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-/**\r
-  Intermediate entry point for the application that will in turn call into the "C" \r
-  style main function.\r
-\r
-  this application must have a function defined as follows:\r
-  INT32 \r
-  EFIAPI \r
-  main(\r
-    UINTN Argc, \r
-    CHAR16 **Argv\r
-  );\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-ShellCEntry(\r
-  IN EFI_HANDLE        ImageHandle,\r
-  IN EFI_SYSTEM_TABLE  *SystemTable\r
-  );
\ No newline at end of file
index 0ce5271f2245f23ead7b15a7cfdb3cec8bca5985..19ade44563b9aa4930a29be00a5084cedf238fc8 100644 (file)
@@ -20,19 +20,33 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #include <Library/DebugLib.h>\r
 \r
-INT32 \r
+INTN\r
 EFIAPI \r
-main(\r
-  UINTN Argc, \r
-  CHAR16 **Argv\r
-);\r
+ShellAppMain (\r
+  IN INTN Argc, \r
+  IN CHAR16 **Argv\r
+  );\r
 \r
+/**\r
+  UEFI entry point for an application that will in turn call a C \r
+  style ShellAppMain function.\r
+\r
+  This application must have a function defined as follows:\r
+\r
+  INTN\r
+  EFIAPI\r
+  ShellAppMain (\r
+    IN INTN Argc, \r
+    IN CHAR16 **Argv\r
+    );\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
-ShellCEntryLib(\r
+ShellCEntryLib (\r
   IN EFI_HANDLE        ImageHandle,\r
   IN EFI_SYSTEM_TABLE  *SystemTable\r
-  ){\r
+  )\r
+{\r
   INT32                         ReturnFromMain;\r
   EFI_SHELL_PARAMETERS_PROTOCOL *EfiShellParametersProtocol;\r
   EFI_SHELL_INTERFACE           *EfiShellInterface;\r
@@ -53,7 +67,10 @@ ShellCEntryLib(
     //\r
     // use shell 2.0 interface\r
     //\r
-    ReturnFromMain = main(EfiShellInterface->Argc, EfiShellInterface->Argv);\r
+    ReturnFromMain = ShellAppMain (\r
+                       EfiShellInterface->Argc,\r
+                       EfiShellInterface->Argv\r
+                       );\r
   } else {\r
     //\r
     // try to get shell 1.0 interface instead.\r
@@ -69,7 +86,10 @@ ShellCEntryLib(
       //\r
       // use shell 1.0 interface\r
       // \r
-      ReturnFromMain = main(EfiShellParametersProtocol->Argc, EfiShellParametersProtocol->Argv);\r
+      ReturnFromMain = ShellAppMain (\r
+                         EfiShellParametersProtocol->Argc,\r
+                         EfiShellParametersProtocol->Argv\r
+                         );\r
     } else {\r
       ASSERT(FALSE);\r
     }\r