]> git.proxmox.com Git - mirror_edk2.git/commit
ShellPkg/Application: Fix ">v" cannot update environment variable
authorChen A Chen <chen.a.chen@intel.com>
Tue, 6 Dec 2016 05:56:46 +0000 (13:56 +0800)
committerRuiyu Ni <ruiyu.ni@intel.com>
Fri, 9 Dec 2016 01:26:28 +0000 (09:26 +0800)
commitc5c994c573f3d4044fa5dde01a81ae5ed479d8fe
tree91a2a34a8466aa2edc2eb92491818260ce882f9a
parent8537bd7ef64f2ccf3b0db515f30813d5c3311a5c
ShellPkg/Application: Fix ">v" cannot update environment variable

When ">v" is used to redirect the command output to environment
variable (e.g.: "echo xxx >v yyy"), we only called SetVariable()
to update the variable storage but forgot to update the cached
environment variables in gShellEnvVarList.
When updating the variable storage, the existing code unnecessary
saved the ending NULL character into variable storage.

The patch fixes all the above issues.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen A Chen <chen.a.chen@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Tapan Shah <tapandshah@hpe.com>
ShellPkg/Application/Shell/FileHandleWrappers.c
ShellPkg/Application/Shell/ShellEnvVar.c
ShellPkg/Application/Shell/ShellProtocol.c