]> git.proxmox.com Git - mirror_edk2.git/commit
MdeModulePkg Variable: return error for empty str VariableName to GetVariable
authorStar Zeng <star.zeng@intel.com>
Fri, 13 May 2016 05:00:01 +0000 (13:00 +0800)
committerStar Zeng <star.zeng@intel.com>
Sun, 15 May 2016 09:48:53 +0000 (17:48 +0800)
commite19eab615305b1490b2dee0de0360736be10f9a7
tree217f677739314a9dfae6ccf29c86c1700a6b9e3e
parentdde4aedc35ee3c06b67c1a5c4f392e7a0b0f8254
MdeModulePkg Variable: return error for empty str VariableName to GetVariable

Current GetVariable implementation will return the first variable for
empty str VariableName, it is because GetVariable and GetNextVariablename
are sharing same function FindVariable.
But UEFI sepc defines SetVariable that If VariableName is an empty string,
then EFI_INVALID_PARAMETER is returned, that means an empty string variable
could never be set successfully, so GetVariable should return error for
empty string VariableName.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c
MdeModulePkg/Universal/Variable/Pei/Variable.c
MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c