aboutsummaryrefslogtreecommitdiffstats
path: root/roms/edk2/ShellPkg/Application/ShellCTestApp/ShellCTestApp.c
diff options
context:
space:
mode:
authorAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
committerAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
commitaf1a266670d040d2f4083ff309d732d648afba2a (patch)
tree2fc46203448ddcc6f81546d379abfaeb323575e9 /roms/edk2/ShellPkg/Application/ShellCTestApp/ShellCTestApp.c
parente02cda008591317b1625707ff8e115a4841aa889 (diff)
Add submodule dependency filesHEADmaster
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'roms/edk2/ShellPkg/Application/ShellCTestApp/ShellCTestApp.c')
-rw-r--r--roms/edk2/ShellPkg/Application/ShellCTestApp/ShellCTestApp.c45
1 files changed, 45 insertions, 0 deletions
diff --git a/roms/edk2/ShellPkg/Application/ShellCTestApp/ShellCTestApp.c b/roms/edk2/ShellPkg/Application/ShellCTestApp/ShellCTestApp.c
new file mode 100644
index 000000000..b9451795f
--- /dev/null
+++ b/roms/edk2/ShellPkg/Application/ShellCTestApp/ShellCTestApp.c
@@ -0,0 +1,45 @@
+/** @file
+ This is a test application that demonstrates how to use the C-style entry point
+ for a shell application.
+
+ Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#include <Uefi.h>
+#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[in] Argc The number of items in Argv.
+ @param[in] Argv Array of pointers to strings.
+
+ @retval 0 The application exited normally.
+ @retval Other An error occurred.
+
+**/
+INTN
+EFIAPI
+ShellAppMain (
+ IN UINTN Argc,
+ IN CHAR16 **Argv
+ )
+{
+ UINTN Index;
+ if (Argc == 1) {
+ Print (L"Argv[1] = NULL\n");
+ }
+ for (Index = 1; Index < Argc; Index++) {
+ Print(L"Argv[%d]: \"%s\"\n", Index, Argv[Index]);
+ }
+
+ return 0;
+}