summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2009-06-23 21:40:29 +0000
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2009-06-23 21:40:29 +0000
commit213f0a3a5dd9262412aecca9eb11727a65d0fb03 (patch)
tree45e49e23d16af4a6621d37901f5e00a82e7f88a4
parente7d8f43526ac0ef6084607bd2c22fd8a2873b3d1 (diff)
Restore Include/Library/ShellCEntryLib.h. Cleanup function and
function prototype comments. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk@8634 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--edk2/ShellPkg/Application/ShellCTestApp/ShellCTestApp.c15
-rw-r--r--edk2/ShellPkg/Include/Library/ShellCEntryLib.h35
-rw-r--r--edk2/ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.c21
3 files changed, 62 insertions, 9 deletions
diff --git a/edk2/ShellPkg/Application/ShellCTestApp/ShellCTestApp.c b/edk2/ShellPkg/Application/ShellCTestApp/ShellCTestApp.c
index 44f50790c..0a50278d7 100644
--- a/edk2/ShellPkg/Application/ShellCTestApp/ShellCTestApp.c
+++ b/edk2/ShellPkg/Application/ShellCTestApp/ShellCTestApp.c
@@ -16,7 +16,22 @@
#include <Library/UefiLib.h>
#include <Library/DebugLib.h>
+#include <Library/ShellCEntryLib.h>
+/**
+ 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 (
diff --git a/edk2/ShellPkg/Include/Library/ShellCEntryLib.h b/edk2/ShellPkg/Include/Library/ShellCEntryLib.h
new file mode 100644
index 000000000..5adbfdfce
--- /dev/null
+++ b/edk2/ShellPkg/Include/Library/ShellCEntryLib.h
@@ -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
+ );
+
diff --git a/edk2/ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.c b/edk2/ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.c
index ce4116657..43d429e6a 100644
--- a/edk2/ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.c
+++ b/edk2/ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.c
@@ -18,6 +18,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Protocol/EfiShellInterface.h>
#include <Protocol/EfiShellParameters.h>
+#include <Library/ShellCEntryLib.h>
#include <Library/DebugLib.h>
INTN
@@ -28,17 +29,19 @@ ShellAppMain (
);
/**
- UEFI entry point for an application that will in turn call a C
- style ShellAppMain function.
+ UEFI entry point for an application that will in turn call the
+ ShellAppMain function which has parameters similar to a standard C
+ main function.
- This application must have a function defined as follows:
+ An application that uses UefiShellCEntryLib must have a ShellAppMain
+ function as prototyped in Include/Library/ShellCEntryLib.h.
+
+ @param ImageHandle The image handle of the UEFI Application.
+ @param SystemTable A pointer to the EFI System Table.
+
+ @retval EFI_SUCCESS The application exited normally.
+ @retval Other An error occurred.
- INTN
- EFIAPI
- ShellAppMain (
- IN INTN Argc,
- IN CHAR16 **Argv
- );
**/
EFI_STATUS
EFIAPI