AJFISH | 2ef2b01 | 2009-12-06 01:57:05 +0000 | [diff] [blame] | 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 |
|
hhtian | 60274cc | 2010-04-29 12:40:51 +0000 | [diff] [blame] | 12 | Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
|
| 13 | Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
AJFISH | 2ef2b01 | 2009-12-06 01:57:05 +0000 | [diff] [blame] | 14 |
|
hhtian | 60274cc | 2010-04-29 12:40:51 +0000 | [diff] [blame] | 15 | This program and the accompanying materials
|
AJFISH | 2ef2b01 | 2009-12-06 01:57:05 +0000 | [diff] [blame] | 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 comamnd 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 |
|