]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Application/ShellCTestApp/ShellCTestApp.c
fixed license header / copyright date on all files.
[mirror_edk2.git] / ShellPkg / Application / ShellCTestApp / ShellCTestApp.c
index 8e771afaebbfdad94492801b4b2bfbc3ad761dd9..0a057742d9ba34292f8aabe736d7a6d0c0833ef3 100644 (file)
@@ -1,27 +1,50 @@
 /** @file\r
-  This is THE shell (application)\r
+  This is a test application that demonstrates how to use the C-style entry point\r
+  for a shell application.\r
 \r
-  Copyright (c) 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
+  Copyright (c) 2009-2010, Intel Corporation. All rights reserved.<BR>\r
+  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
+  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
 #include <Uefi.h>\r
-\r
 #include <Library/UefiLib.h>\r
 #include <Library/DebugLib.h>\r
+#include <Library/ShellCEntryLib.h>\r
+\r
+/**\r
+  UEFI application entry point which has an interface similar to a\r
+  standard C main function.\r
+\r
+  The ShellCEntryLib library instance wrappers the actual UEFI application\r
+  entry point and calls this ShellAppMain function.\r
+\r
+  @param  ImageHandle  The image handle of the UEFI Application.\r
+  @param  SystemTable  A pointer to the EFI System Table.\r
+\r
+  @retval  0               The application exited normally.\r
+  @retval  Other           An error occurred.\r
+\r
+**/\r
+INTN\r
+EFIAPI\r
+ShellAppMain (\r
+  IN UINTN Argc,\r
+  IN CHAR16 **Argv\r
+  )\r
+{\r
+  UINTN  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
-INT32 \r
-EFIAPI \r
-main(\r
-  UINTN Argc, \r
-  CHAR16 **Argv\r
-  ){\r
-  Print(L"Test Complete\r\n");\r
-}
\ No newline at end of file
+  return 0;\r
+}\r