]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | This is a test application that demonstrates how to use the C-style entry point \r | |
3 | for a shell application.\r | |
4 | \r | |
5 | Copyright (c) 2009, Intel Corporation \r | |
6 | All rights reserved. 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 | |
10 | \r | |
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 | |
13 | \r | |
14 | **/\r | |
15 | \r | |
16 | #include <Uefi.h>\r | |
17 | #include <Library/UefiLib.h>\r | |
18 | #include <Library/DebugLib.h>\r | |
19 | #include <Library/ShellCEntryLib.h>\r | |
20 | \r | |
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 | |
28 | @param ImageHandle The image handle of the UEFI Application.\r | |
29 | @param SystemTable A pointer to the EFI System Table.\r | |
30 | \r | |
31 | @retval 0 The application exited normally.\r | |
32 | @retval Other An error occurred.\r | |
33 | \r | |
34 | **/\r | |
35 | INTN \r | |
36 | EFIAPI \r | |
37 | ShellAppMain (\r | |
38 | IN UINTN Argc, \r | |
39 | IN CHAR16 **Argv\r | |
40 | )\r | |
41 | {\r | |
42 | UINTN Index;\r | |
43 | \r | |
44 | Print(L"ShellCTestApp.c:ShellAppMain called with %d parameters\n", Argc);\r | |
45 | for (Index = 0; Index < Argc; Index++) {\r | |
46 | Print(L"Argv[%d]: %s\n", Index, Argv[Index]);\r | |
47 | }\r | |
48 | \r | |
49 | return 0;\r | |
50 | }\r |