Home | History | Annotate | Download | only in EblExternCmd
      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 #include "Ebl.h"
     27 
     28 /**
     29   Entry point with Argc, Argv. Put your code here.
     30 
     31   @param  Argc   Number of command arguments in Argv
     32   @param  Argv   Array of strings that represent the parsed command line.
     33                  Argv[0] is the command name
     34 
     35   @return EFI_SUCCESS
     36 
     37 **/
     38 EFI_STATUS
     39 EblMain (
     40   IN UINTN  Argc,
     41   IN CHAR8  **Argv
     42   )
     43 {
     44   UINTN   Index;
     45 
     46   AsciiPrint ("Hello World\n");
     47   for (Index = 0; Index < Argc; Index++) {
     48     AsciiPrint ("Argv[%d] = %a\n", Index, Argv[Index]);
     49   }
     50 
     51   return EFI_SUCCESS;
     52 }
     53 
     54