]>
Commit | Line | Data |
---|---|---|
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 |
56ba3746 | 6 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
722529bb | 7 | \r |
8 | **/\r | |
9 | \r | |
10 | #include <Uefi.h>\r | |
722529bb | 11 | #include <Library/UefiLib.h>\r |
12 | #include <Library/DebugLib.h>\r | |
322016e5 | 13 | #include <Library/ShellCEntryLib.h>\r |
722529bb | 14 | \r |
322016e5 | 15 | /**\r |
16 | UEFI application entry point which has an interface similar to a\r | |
17 | standard C main function.\r | |
18 | \r | |
19 | The ShellCEntryLib library instance wrappers the actual UEFI application\r | |
20 | entry point and calls this ShellAppMain function.\r | |
21 | \r | |
dc56f067 | 22 | @param[in] Argc The number of items in Argv.\r |
23 | @param[in] Argv Array of pointers to strings.\r | |
322016e5 | 24 | \r |
25 | @retval 0 The application exited normally.\r | |
26 | @retval Other An error occurred.\r | |
27 | \r | |
28 | **/\r | |
1e6e84c7 | 29 | INTN\r |
30 | EFIAPI\r | |
39157531 | 31 | ShellAppMain (\r |
1e6e84c7 | 32 | IN UINTN Argc,\r |
39157531 | 33 | IN CHAR16 **Argv\r |
34 | )\r | |
35 | {\r | |
c5ce665f | 36 | UINTN Index;\r |
7534ae58 RN |
37 | if (Argc == 1) {\r |
38 | Print (L"Argv[1] = NULL\n");\r | |
39 | }\r | |
40 | for (Index = 1; Index < Argc; Index++) {\r | |
41 | Print(L"Argv[%d]: \"%s\"\n", Index, Argv[Index]);\r | |
39157531 | 42 | }\r |
43 | \r | |
44 | return 0;\r | |
ea00288c | 45 | }\r |