diff options
author | Jaben Carsey <jaben.carsey@intel.com> | 2014-02-11 23:56:32 +0000 |
---|---|---|
committer | jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> | 2014-02-11 23:56:32 +0000 |
commit | fc4c7b30d9f0e5d3d9bc8dad13c5737c3da34f29 (patch) | |
tree | 2aff5dec568223d605a7f0eec5a988764247c99a /ShellPkg | |
parent | ba71f790583850b01a6336a3ac246a0ced877ce5 (diff) | |
download | edk2-platforms-fc4c7b30d9f0e5d3d9bc8dad13c5737c3da34f29.tar.xz |
ShellPkg: Fix changing to file system with 2 colons like "fs0::"
first colon must be last character in the string.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15226 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg')
-rw-r--r-- | ShellPkg/Application/Shell/Shell.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ShellPkg/Application/Shell/Shell.c b/ShellPkg/Application/Shell/Shell.c index e00a57ba2e..2d5c89aadf 100644 --- a/ShellPkg/Application/Shell/Shell.c +++ b/ShellPkg/Application/Shell/Shell.c @@ -1677,10 +1677,12 @@ GetOperationType( }
//
- // Test for file system change request. anything ending with : and cant have spaces.
+ // Test for file system change request. anything ending with first : and cant have spaces.
//
if (CmdName[(StrLen(CmdName)-1)] == L':') {
- if (StrStr(CmdName, L" ") != NULL) {
+ if ( StrStr(CmdName, L" ") != NULL
+ || StrLen(StrStr(CmdName, L":")) > 1
+ ) {
return (Unknown_Invalid);
}
return (File_Sys_Change);
|