]> git.proxmox.com Git - mirror_edk2.git/blob - EmbeddedPkg/EblExternCmd/Main.c
9f38c5de58bfb85ee0870a0540724ecc51c510ff
[mirror_edk2.git] / EmbeddedPkg / EblExternCmd / Main.c
1 /** @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
12 Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
13 Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
14
15 This program and the accompanying materials
16 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 command name
33
34 @return EFI_SUCCESS
35
36 **/
37 EFI_STATUS
38 EblMain (
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