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 This program and the accompanying materials 7 are licensed and made available under the terms and conditions of the BSD License 8 which accompanies this distribution. The full text of the license may be found at 9 http://opensource.org/licenses/bsd-license.php 10 11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 14 **/ 15 16 #include <Uefi.h> 17 #include <Library/UefiLib.h> 18 #include <Library/DebugLib.h> 19 #include <Library/ShellCEntryLib.h> 20 21 /** 22 UEFI application entry point which has an interface similar to a 23 standard C main function. 24 25 The ShellCEntryLib library instance wrappers the actual UEFI application 26 entry point and calls this ShellAppMain function. 27 28 @param[in] Argc The number of items in Argv. 29 @param[in] Argv Array of pointers to strings. 30 31 @retval 0 The application exited normally. 32 @retval Other An error occurred. 33 34 **/ 35 INTN 36 EFIAPI 37 ShellAppMain ( 38 IN UINTN Argc, 39 IN CHAR16 **Argv 40 ) 41 { 42 UINTN Index; 43 if (Argc == 1) { 44 Print (L"Argv[1] = NULL\n"); 45 } 46 for (Index = 1; Index < Argc; Index++) { 47 Print(L"Argv[%d]: \"%s\"\n", Index, Argv[Index]); 48 } 49 50 return 0; 51 } 52