diff options
author | Ruiyu Ni <ruiyu.ni@intel.com> | 2016-11-11 12:12:51 +0800 |
---|---|---|
committer | Ruiyu Ni <ruiyu.ni@intel.com> | 2016-11-16 12:32:17 +0800 |
commit | e9597b4519cbeda1c5175518f79a80d7f0b6353b (patch) | |
tree | 74851bbe884148457011dc7f2b59a45b8c5f7a83 /ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni | |
parent | 86a1eca2101686d476ab191f0511b44e369fd8a7 (diff) | |
download | edk2-e9597b4519cbeda1c5175518f79a80d7f0b6353b.tar.gz edk2-e9597b4519cbeda1c5175518f79a80d7f0b6353b.tar.bz2 edk2-e9597b4519cbeda1c5175518f79a80d7f0b6353b.zip |
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>
Diffstat (limited to 'ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni')
-rw-r--r-- | ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni index 52c2af02a3..bd1726bf13 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni @@ -407,9 +407,14 @@ #string STR_DMPSTORE_HEADER_LINE #language en-US "Variable %H%s%N '%H%g%N:%H%s%N' DataSize = 0x%02x\r\n"
#string STR_DMPSTORE_DELETE_LINE #language en-US "Delete variable '%H%g%N:%H%s%N': %r\r\n"
#string STR_DMPSTORE_NO_VAR_FOUND #language en-US "%H%s%N: No matching variables found.\r\n"
+#string STR_DMPSTORE_NO_VAR_FOUND_SFO #language en-US "VariableInfo,\"\",\"\",\"\",\"\",\"\"\r\n"
#string STR_DMPSTORE_NO_VAR_FOUND_GN #language en-US "%H%s%N: No matching variables found. Guid %g, Name %s\r\n"
+#string STR_DMPSTORE_NO_VAR_FOUND_NG_SFO #language en-US "VariableInfo,\"%s\",\"%g\",\"\",\"\",\"\"\r\n"
#string STR_DMPSTORE_NO_VAR_FOUND_N #language en-US "%H%s%N: No matching variables found. Name %s\r\n"
+#string STR_DMPSTORE_NO_VAR_FOUND_N_SFO #language en-US #language en-US "VariableInfo,\"%s\",\"\",\"\",\"\",\"\"\r\n"
#string STR_DMPSTORE_NO_VAR_FOUND_G #language en-US "%H%s%N: No matching variables found. Guid %g\r\n"
+#string STR_DMPSTORE_NO_VAR_FOUND_G_SFO #language en-US "VariableInfo,\"\",\"%g\",\"\",\"\",\"\"\r\n"
+#string STR_DMPSTORE_VAR_SFO #language en-US "VariableInfo,\"%s\",\"%g\",\"0x%x\",\"0x%x\",\"%s\"\r\n"
#string STR_GET_HELP_COMP #language en-US ""
".TH comp 0 "Compare 2 files"\r\n"
@@ -1015,7 +1020,7 @@ "Manages all UEFI variables.\r\n"
".SH SYNOPSIS\r\n"
" \r\n"
-"DMPSTORE [-b] [-d] [-all | ([variable] [-guid guid])]\r\n"
+"DMPSTORE [-b] [-d] [-all | ([variable] [-guid guid])] [-sfo]\r\n"
"DMPSTORE [-all | ([variable] [-guid guid])] [-s file]\r\n"
"DMPSTORE [-all | ([variable] [-guid guid])] [-l file]\r\n"
".SH OPTIONS\r\n"
@@ -1024,6 +1029,7 @@ " -guid - Specifies the GUID of the variables to be displayed in\r\n"
" standard text format. If not specified and -all is not\r\n"
" specified, the EFI_GLOBAL_VARIABLE GUID is assumed.\r\n"
+" -sfo - Displays information as described in Standard-Format Output.\r\n"
" -all - Dumps all variables, including those\r\n"
" with a different GUID than EFI_GLOBAL_VARIABLE.\r\n"
" -d - Delete variables.\r\n"
|