]> git.proxmox.com Git - mirror_edk2.git/blob - ShellPkg/Application/ShellCTestApp/ShellCTestApp.c
ShellPkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / ShellPkg / Application / ShellCTestApp / ShellCTestApp.c
1 /** @file
2 This is a test application that demonstrates how to use the C-style entry point
3 for a shell application.
4
5 Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7
8 **/
9
10 #include <Uefi.h>
11 #include <Library/UefiLib.h>
12 #include <Library/DebugLib.h>
13 #include <Library/ShellCEntryLib.h>
14
15 /**
16 UEFI application entry point which has an interface similar to a
17 standard C main function.
18
19 The ShellCEntryLib library instance wrappers the actual UEFI application
20 entry point and calls this ShellAppMain function.
21
22 @param[in] Argc The number of items in Argv.
23 @param[in] Argv Array of pointers to strings.
24
25 @retval 0 The application exited normally.
26 @retval Other An error occurred.
27
28 **/
29 INTN
30 EFIAPI
31 ShellAppMain (
32 IN UINTN Argc,
33 IN CHAR16 **Argv
34 )
35 {
36 UINTN Index;
37 if (Argc == 1) {
38 Print (L"Argv[1] = NULL\n");
39 }
40 for (Index = 1; Index < Argc; Index++) {
41 Print(L"Argv[%d]: \"%s\"\n", Index, Argv[Index]);
42 }
43
44 return 0;
45 }