From: Dandan Bi <dandan.bi@intel.com>
To: edk2-devel@lists.01.org
Cc: Ruiyu Ni <ruiyu.ni@intel.com>, Jaben Carsey <jaben.carsey@intel.com>
Subject: [patch] ShellPkg: Fix the incorrect return status in function FindFiles()
Date: Wed, 24 Aug 2016 11:12:54 +0800 [thread overview]
Message-ID: <1472008374-168240-1-git-send-email-dandan.bi@intel.com> (raw)
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>
---
ShellPkg/Application/Shell/ShellProtocol.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/ShellPkg/Application/Shell/ShellProtocol.c b/ShellPkg/Application/Shell/ShellProtocol.c
index 0e5d954..6f29250 100644
--- a/ShellPkg/Application/Shell/ShellProtocol.c
+++ b/ShellPkg/Application/Shell/ShellProtocol.c
@@ -2507,10 +2507,14 @@ ShellSearchHandle(
Status = EfiShellFreeFileList(&ShellInfo);
}
}
}
+ if (*FileList == NULL || (*FileList != NULL && IsListEmpty(&(*FileList)->Link))) {
+ Status = EFI_NOT_FOUND;
+ }
+
FreePool(CurrentFilePattern);
return (Status);
}
/**
--
1.9.5.msysgit.1
next reply other threads:[~2016-08-24 3:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-24 3:12 Dandan Bi [this message]
2016-08-24 3:27 ` [patch] ShellPkg: Fix the incorrect return status in function FindFiles() Ni, Ruiyu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1472008374-168240-1-git-send-email-dandan.bi@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox