]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Restore Include/Library/ShellCEntryLib.h. Cleanup function and
authorjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 23 Jun 2009 21:40:29 +0000 (21:40 +0000)
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 23 Jun 2009 21:40:29 +0000 (21:40 +0000)
function prototype comments.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8634 6f19259b-4bc3-4df7-8a09-765794883524

ShellPkg/Application/ShellCTestApp/ShellCTestApp.c
ShellPkg/Include/Library/ShellCEntryLib.h [new file with mode: 0644]
ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.c

index 44f50790c0c38676a087beefa13f67c7a64d5142..0a50278d7f4a1284484d081f15028f5707d93274 100644 (file)
 \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
diff --git a/ShellPkg/Include/Library/ShellCEntryLib.h b/ShellPkg/Include/Library/ShellCEntryLib.h
new file mode 100644 (file)
index 0000000..5adbfdf
--- /dev/null
@@ -0,0 +1,35 @@
+/** @file
+  Provides application point extension for "C" style main funciton 
+
+Copyright (c) 2006 - 2009, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution.  The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+/**
+  UEFI application entry point which has an interface similar to a
+  standard C main function.
+
+  The ShellCEntryLib library instance wrappers the actual UEFI application
+  entry point and calls this ShellAppMain function.
+
+  @param  ImageHandle  The image handle of the UEFI Application.
+  @param  SystemTable  A pointer to the EFI System Table.
+
+  @retval  0               The application exited normally.
+  @retval  Other           An error occurred.
+
+**/
+INTN
+EFIAPI 
+ShellAppMain (
+  IN INTN Argc, 
+  IN CHAR16 **Argv
+  );
+
index ce41166573eb6adad0168e8cc34ff40a07145b99..43d429e6a560f4244d7bfe8fae9e1362d256138f 100644 (file)
@@ -18,6 +18,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Protocol/EfiShellInterface.h>\r
 #include <Protocol/EfiShellParameters.h>\r
 \r
+#include <Library/ShellCEntryLib.h>\r
 #include <Library/DebugLib.h>\r
 \r
 INTN\r
@@ -28,17 +29,19 @@ ShellAppMain (
   );\r
 \r
 /**\r
-  UEFI entry point for an application that will in turn call a C \r
-  style ShellAppMain function.\r
+  UEFI entry point for an application that will in turn call the\r
+  ShellAppMain function which has parameters similar to a standard C\r
+  main function.\r
 \r
-  This application must have a function defined as follows:\r
+  An application that uses UefiShellCEntryLib must have a ShellAppMain\r
+  function as prototyped in Include/Library/ShellCEntryLib.h.\r
+\r
+  @param  ImageHandle  The image handle of the UEFI Application.\r
+  @param  SystemTable  A pointer to the EFI System Table.\r
+\r
+  @retval  EFI_SUCCESS               The application exited normally.\r
+  @retval  Other                     An error occurred.\r
 \r
-  INTN\r
-  EFIAPI\r
-  ShellAppMain (\r
-    IN INTN Argc, \r
-    IN CHAR16 **Argv\r
-    );\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r