Yes, except if the shell can't find the man file (or it is invalid), then the 
shell should simply execute the .efi and let it handle the command line 
(regardless of EFI_HII_PACKAGE_LIST_PROTOCOL_GUID, etc.).

Regards,
Jim

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Ni, Ruiyu
Sent: Monday, September 14, 2015 9:54 PM
To: edk2-devel@lists.01.org
Cc: Carsey, Jaben; chr...@hpe.com; Hale, Robert P; Rothman, Michael A
Subject: [edk2] Proposal to let standalone UEFI shell application carry help 
inside .EFI instead of in .MAN file

All,
UEFI Shell scandalizes the help message in spec level so that a standalone UEFI 
shell application can never get "-?" switch, instead the Shell core 
(interpreter) detects the "-?" and finds .MAN file for that shell application 
in certain spec defined paths, then show the help extracted from that .MAN file.

But it means distributing a UEFI shell application not only means distributing 
a .EFI file but also distributing a .MAN file. If the text formatted .MAN file 
is corrupted (edited by user by mistake), or is missing (deleted by user by 
mistake), no help will be shown to user.

So I propose to embedded the help message inside the .EFI file in a PE resource 
section and the algorithm to find help for a standalone application is as 
following.

Search command.man file for valid help content If command.man exists and help 
content is valid:
Display the help
Else:
Load the command.efi (do not start it)
Check whether the ImageHandle has EFI_HII_PACKAGE_LIST_PROTOCOL_GUID installed 
Check all strings in the HII packages to find a string which follows spec 
defined help format If the string exists:
Display the help
Else:
Show "no Help"

Any comments, concerns?


Regards,
Ray

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to