#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
+++ /dev/null
-/** @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
\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
//\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
//\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