public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ni, Ruiyu" <ruiyu.ni@intel.com>
To: "Bi, Dandan" <dandan.bi@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Carsey, Jaben" <jaben.carsey@intel.com>
Subject: Re: [patch] ShellPkg: Fix the incorrect return status in function FindFiles()
Date: Wed, 24 Aug 2016 03:27:22 +0000	[thread overview]
Message-ID: <734D49CCEBEEF84792F5B80ED585239D1ADC0B09@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <1472008374-168240-1-git-send-email-dandan.bi@intel.com>


Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
> -----Original Message-----
> From: Bi, Dandan
> Sent: Wednesday, August 24, 2016 11:13 AM
> To: edk2-devel@lists.01.org
> Cc: Ni, Ruiyu <ruiyu.ni@intel.com>; Carsey, Jaben <jaben.carsey@intel.com>
> Subject: [patch] 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>
> ---
>  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



      reply	other threads:[~2016-08-24  3:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-24  3:12 [patch] ShellPkg: Fix the incorrect return status in function FindFiles() Dandan Bi
2016-08-24  3:27 ` Ni, Ruiyu [this message]

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=734D49CCEBEEF84792F5B80ED585239D1ADC0B09@SHSMSX103.ccr.corp.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