blob: 9a3dcce74cfdb9ad9ee460cd96bb88e08eb8ff28 [file] [log] [blame]
AJFISH2ef2b012009-12-06 01:57:05 +00001/** @file
2 Example of an external EBL command. It's loaded via EBL start command.
3 Argc and Argv are passed in via "" of the EBL command line.
4
5 Start fs0:\EdkExternCmd.efi "Argv[0] Argv[1] 2"
6
7 will launch this command with
8 Argv[0] = "Argv[0]"
9 Argv[1] = "Argv[2]"
10 Argv[2] = "3"
11
hhtian60274cc2010-04-29 12:40:51 +000012 Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
13 Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
AJFISH2ef2b012009-12-06 01:57:05 +000014
hhtian60274cc2010-04-29 12:40:51 +000015 This program and the accompanying materials
AJFISH2ef2b012009-12-06 01:57:05 +000016 are licensed and made available under the terms and conditions of the BSD License
17 which accompanies this distribution. The full text of the license may be found at
18 http://opensource.org/licenses/bsd-license.php
19
20 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
21 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
22
23
24**/
25
26
27/**
28 Entry point with Argc, Argv. Put your code here.
29
30 @param Argc Number of command arguments in Argv
31 @param Argv Array of strings that represent the parsed command line.
32 Argv[0] is the comamnd name
33
34 @return EFI_SUCCESS
35
36**/
37EFI_STATUS
38EblMain (
39 IN UINTN Argc,
40 IN CHAR8 **Argv
41 )
42{
43 UINTN Index;
44
45 AsciiPrint ("Hello World\n");
46 for (Index = 0; Index < Argc; Index++) {
47 AsciiPrint ("Argv[%d] = %a\n", Index, Argv[Index]);
48 }
49
50 return EFI_SUCCESS;
51}
52