Looks like the UEFI Shell spec needs an update, since it cannot claim this.

The UEFI spec allows for Boot Load Option variables (Boot####), which can 
contain OptionalData to be passed to a .efi application.  The OptionalData does 
not have to contain the .efi file name.

The UEFI Shell .efi could be launched as a boot option (EX: .efi in the FV, or 
from a filesystem), and a system firmware implementation could choose to 
populate OptionalData with supported command-line options (EX: -nostartup).  
This would result in Argv[0] being a command-line option.  There is no UEFI 
requirement that the OptionalData provide something like shell.efi as the first 
argument.

Do you agree with this use case and need to change the wording in the UEFI 
Shell spec?

Thanks,
Chris

From: Olivier Martin [mailto:olivier.mar...@arm.com]
Sent: Wednesday, April 02, 2014 10:43 AM
To: 'Carsey, Jaben'; Brendan Jackman
Cc: Phillips, Chris J (BCS CFE); edk2-devel@lists.sourceforge.net
Subject: RE: ShellPkg: Fix command-line parsing to start with Argv[0] when 
comparing passed-in options

The UEFI Shell Spec 2.0 says "The first entry in the array is always the full 
file path of the executable." (see 2.3 EFI_SHELL_PARAMETERS_PROTOCOL).

In which case can we get an option in Argv[0] ?


From: Carsey, Jaben [mailto:jaben.car...@intel.com]
Sent: 01 April 2014 23:23
To: Brendan Jackman; Olivier Martin
Cc: Phillips, Chris J (BCS CFE); 
edk2-devel@lists.sourceforge.net<mailto:edk2-devel@lists.sourceforge.net>; 
Carsey, Jaben
Subject: RE: ShellPkg: Fix command-line parsing to start with Argv[0] when 
comparing passed-in options

That patch looks good to me.
Reviewed-by: Jaben Carsey 
<jaben.car...@intel.com<mailto:jaben.car...@intel.com>>

Brendan or Olivier,  this is the same part of the shell that you made a recent 
change to.  Can one of you please review this patch?

I will wait to commit this patch until at least Friday the 4th of April to give 
you time to review it.

-Jaben

From: Phillips, Chris J (BCS CFE) [mailto:chr...@hp.com]
Sent: Tuesday, April 01, 2014 3:07 PM
To: Carsey, Jaben; 
edk2-devel@lists.sourceforge.net<mailto:edk2-devel@lists.sourceforge.net>
Subject: ShellPkg: Fix command-line parsing to start with Argv[0] when 
comparing passed-in options
Importance: High


Please review the attached patch file.



This update resolves an issue where a UEFI Shell boot option is created with 
OptionalData that contains UEFI Shell spec defined command-line options 
starting in Argv[0].  The prior code change skipped processing the first 
passed-in option.



Thanks,

Chris







ShellPkg: Fix command-line parsing to start with Argv[0] when comparing 
passed-in options



Contributed-under: TianoCore Contribution Agreement 1.0

Signed-off-by: Chris Phillips <chr...@hp.com<mailto:chr...@hp.com>>
------------------------------------------------------------------------------
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to