]> git.proxmox.com Git - mirror_edk2.git/commit
ShellPkg/set: Fix EfiShellSetEnv to use case sensitive compare
authorRuiyu Ni <ruiyu.ni@intel.com>
Tue, 7 Aug 2018 09:13:07 +0000 (17:13 +0800)
committerRuiyu Ni <ruiyu.ni@intel.com>
Thu, 16 Aug 2018 03:38:27 +0000 (11:38 +0800)
commit0e967dff0642cedaef7bc63e5743f4b081a1db9a
treeb3c0afeeef96f699ade3f493c9ad97be5ca51f40
parent855698fb69fdb85fa24c4374d07947106f4de828
ShellPkg/set: Fix EfiShellSetEnv to use case sensitive compare

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=777

Per Shell spec, the environment variable has a case-sensitive name.
But today's implementation of EfiShellSetEnv() compares the
environment variable name case insensitively, which causes variable
like "CWD" cannot be set due to "cwd" is pre-defined variable.

The patch fixes this issue.

The EfiShellGetEnv() doesn't have such issue because it will
call into ShellFindEnvVarInList() which uses StrCmp().

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Jim Dailey <jim_dailey@dell.com>
ShellPkg/Application/Shell/ShellProtocol.c