]> git.proxmox.com Git - mirror_edk2.git/commit
ShellPkg/dmpstore: Support "-sfo"
authorRuiyu Ni <ruiyu.ni@intel.com>
Fri, 11 Nov 2016 04:12:51 +0000 (12:12 +0800)
committerRuiyu Ni <ruiyu.ni@intel.com>
Wed, 16 Nov 2016 04:32:17 +0000 (12:32 +0800)
commite9597b4519cbeda1c5175518f79a80d7f0b6353b
tree74851bbe884148457011dc7f2b59a45b8c5f7a83
parent86a1eca2101686d476ab191f0511b44e369fd8a7
ShellPkg/dmpstore: Support "-sfo"

The patch adds the "-sfo" support to "dmpstore" command.

When -l or -d is specified, -sfo is not supported.

When the variable specified by name and GUID cannot be found,
an error message is displayed; Otherwise, the SFO is displayed.
E.g.: "dmpstore -guid GuidThatDoesntExist -sfo" produces output
as:
ShellCommand,"dmpstore"
VariableInfo,"","GuidThatDoesntExist","","",""

"dmpstore NameThatDoesntExist -guid GuidThatDoesntExist -sfo"
produces output as:
ShellCommand,"dmpstore"
dmpstore: No matching variables found. Guid GuidThatDoesntExist, Name
NameThatDoesntExist

The difference between the above 2 cases is that former one only
specifies the GUID, but the latter one specifies both name and GUID.
Since not specifying GUID means to use GlobalVariableGuid,
"dmpstore NameThatDoesntExist -sfo" produces the similar output as
latter one.
I personally prefer to always produce SFO output for both cases.
But the above behavior is the discussion result between HPE engineers.

Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Signed-off-by: Chen A Chen <chen.a.chen@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Tapan Shah <tapandshah@hpe.com>
ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c
ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni