]> git.proxmox.com Git - mirror_edk2.git/blame - ShellPkg/Application/ShellCTestApp/ShellCTestApp.c
ShellBinPkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / ShellPkg / Application / ShellCTestApp / ShellCTestApp.c
CommitLineData
722529bb 1/** @file\r
1e6e84c7 2 This is a test application that demonstrates how to use the C-style entry point\r
ea00288c 3 for a shell application.\r
722529bb 4\r
7534ae58 5 Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>\r
1e6e84c7 6 This program and the accompanying materials\r
7 are licensed and made available under the terms and conditions of the BSD License\r
8 which accompanies this distribution. The full text of the license may be found at\r
9 http://opensource.org/licenses/bsd-license.php\r
722529bb 10\r
1e6e84c7 11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
722529bb 13\r
14**/\r
15\r
16#include <Uefi.h>\r
722529bb 17#include <Library/UefiLib.h>\r
18#include <Library/DebugLib.h>\r
322016e5 19#include <Library/ShellCEntryLib.h>\r
722529bb 20\r
322016e5 21/**\r
22 UEFI application entry point which has an interface similar to a\r
23 standard C main function.\r
24\r
25 The ShellCEntryLib library instance wrappers the actual UEFI application\r
26 entry point and calls this ShellAppMain function.\r
27\r
dc56f067 28 @param[in] Argc The number of items in Argv.\r
29 @param[in] Argv Array of pointers to strings.\r
322016e5 30\r
31 @retval 0 The application exited normally.\r
32 @retval Other An error occurred.\r
33\r
34**/\r
1e6e84c7 35INTN\r
36EFIAPI\r
39157531 37ShellAppMain (\r
1e6e84c7 38 IN UINTN Argc,\r
39157531 39 IN CHAR16 **Argv\r
40 )\r
41{\r
c5ce665f 42 UINTN Index;\r
7534ae58
RN
43 if (Argc == 1) {\r
44 Print (L"Argv[1] = NULL\n");\r
45 }\r
46 for (Index = 1; Index < Argc; Index++) {\r
47 Print(L"Argv[%d]: \"%s\"\n", Index, Argv[Index]);\r
39157531 48 }\r
49\r
50 return 0;\r
ea00288c 51}\r