Star,
Per my understanding, FilePath means the full path pointing to the file,
FileName means the very last part of the full path.
E.g.: "fs0:\a\b\c\d.txt" is a FilePath, "d.txt" is a FileName.

So I think only specifying FileName is not enough to identify a file.
The parameter name should be fine.

> -----Original Message-----
> From: Zeng, Star
> Sent: Saturday, September 29, 2018 5:43 PM
> To: edk2-devel@lists.01.org
> Cc: Zeng, Star <star.z...@intel.com>; Ni, Ruiyu <ruiyu...@intel.com>; Carsey,
> Jaben <jaben.car...@intel.com>
> Subject: [PATCH] ShellPkg ShellLib.h: Fix wrong parameter name for
> ShellOpenFileByName
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1221
> 
> The parameter name FilePath should be FileName.
> 
> I am trying to write an application for my own use and want to use this 
> interface,
> but confused by the parameter name.
> 
> Interesting, the implementation in UefiShellLib.c is correct.
> 
> Cc: Ruiyu Ni <ruiyu...@intel.com>
> Cc: Jaben Carsey <jaben.car...@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Star Zeng <star.z...@intel.com>
> ---
>  ShellPkg/Include/Library/ShellLib.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/ShellPkg/Include/Library/ShellLib.h
> b/ShellPkg/Include/Library/ShellLib.h
> index 92fddc50f5dd..d6a5319285dd 100644
> --- a/ShellPkg/Include/Library/ShellLib.h
> +++ b/ShellPkg/Include/Library/ShellLib.h
> @@ -126,7 +126,7 @@ ShellOpenFileByDevicePath(
>    otherwise, the Filehandle is NULL. Attributes is valid only for
>    EFI_FILE_MODE_CREATE.
> 
> -  @param[in] FilePath           The pointer to file name.
> +  @param[in] FileName           The pointer to file name.
>    @param[out] FileHandle        The pointer to the file handle.
>    @param[in] OpenMode           The mode to open the file with.
>    @param[in] Attributes         The file's file attributes.
> @@ -151,7 +151,7 @@ ShellOpenFileByDevicePath(  EFI_STATUS  EFIAPI
> ShellOpenFileByName(
> -  IN CONST CHAR16               *FilePath,
> +  IN CONST CHAR16               *FileName,
>    OUT SHELL_FILE_HANDLE         *FileHandle,
>    IN UINT64                     OpenMode,
>    IN UINT64                     Attributes
> --
> 2.7.0.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to