diff options
author | Dandan Bi <dandan.bi@intel.com> | 2016-08-23 10:29:08 +0800 |
---|---|---|
committer | Ruiyu Ni <ruiyu.ni@intel.com> | 2016-09-01 16:38:07 +0800 |
commit | 00afc8f82061677fedc86cb05e3b8c75a3c986ff (patch) | |
tree | b011a0cbccd31661e00d0b703928cc4691a56b2a | |
parent | c6fc823413861c6bcafbb21bae9aab66b8ee5a24 (diff) | |
download | edk2-00afc8f82061677fedc86cb05e3b8c75a3c986ff.tar.gz edk2-00afc8f82061677fedc86cb05e3b8c75a3c986ff.tar.bz2 edk2-00afc8f82061677fedc86cb05e3b8c75a3c986ff.zip |
ShellPkg: Fix the incorrect return status in function FindFiles()
According to the latest shell spec, in function FindFiles(),
when no files were found, it should return EFI_NOT_FOUND.
But current codes don't follow the spec.
This patch is to fix this issue.
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
-rw-r--r-- | ShellPkg/Application/Shell/ShellProtocol.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ShellPkg/Application/Shell/ShellProtocol.c b/ShellPkg/Application/Shell/ShellProtocol.c index 0e5d954e45..6f292507a9 100644 --- a/ShellPkg/Application/Shell/ShellProtocol.c +++ b/ShellPkg/Application/Shell/ShellProtocol.c @@ -2509,6 +2509,10 @@ ShellSearchHandle( }
}
+ if (*FileList == NULL || (*FileList != NULL && IsListEmpty(&(*FileList)->Link))) {
+ Status = EFI_NOT_FOUND;
+ }
+
FreePool(CurrentFilePattern);
return (Status);
}
|