From: "Zeng, Star" <star.zeng@intel.com>
To: "Ni, Ruiyu" <ruiyu.ni@intel.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Carsey, Jaben" <jaben.carsey@intel.com>,
"Zeng, Star" <star.zeng@intel.com>
Subject: Re: [PATCH] ShellPkg ShellLib.h: Fix wrong parameter name for ShellOpenFileByName
Date: Sun, 30 Sep 2018 01:20:27 +0000 [thread overview]
Message-ID: <0C09AFA07DD0434D9E2A0C6AEB0483103BBF6357@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <734D49CCEBEEF84792F5B80ED585239D5BE59961@SHSMSX104.ccr.corp.intel.com>
Ray,
Thanks.
I did not check the detail. But at least, one of definition and implementation needs to be updated. Maybe the description need to be enhanced also as you described.
ShellLib.h:
EFI_STATUS
EFIAPI
ShellOpenFileByDevicePath(
IN OUT EFI_DEVICE_PATH_PROTOCOL **FilePath,
OUT SHELL_FILE_HANDLE *FileHandle,
IN UINT64 OpenMode,
IN UINT64 Attributes
);
EFI_STATUS
EFIAPI
ShellOpenFileByName(
IN CONST CHAR16 *FilePath,
OUT SHELL_FILE_HANDLE *FileHandle,
IN UINT64 OpenMode,
IN UINT64 Attributes
);
UefiShellLib.c:
EFI_STATUS
EFIAPI
ShellOpenFileByDevicePath(
IN OUT EFI_DEVICE_PATH_PROTOCOL **FilePath,
OUT SHELL_FILE_HANDLE *FileHandle,
IN UINT64 OpenMode,
IN UINT64 Attributes
)
EFI_STATUS
EFIAPI
ShellOpenFileByName(
IN CONST CHAR16 *FileName,
OUT SHELL_FILE_HANDLE *FileHandle,
IN UINT64 OpenMode,
IN UINT64 Attributes
)
Star
-----Original Message-----
From: Ni, Ruiyu
Sent: Sunday, September 30, 2018 9:12 AM
To: Zeng, Star <star.zeng@intel.com>; edk2-devel@lists.01.org
Cc: Carsey, Jaben <jaben.carsey@intel.com>
Subject: RE: [PATCH] ShellPkg ShellLib.h: Fix wrong parameter name for ShellOpenFileByName
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.zeng@intel.com>; Ni, Ruiyu <ruiyu.ni@intel.com>;
> Carsey, Jaben <jaben.carsey@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.ni@intel.com>
> Cc: Jaben Carsey <jaben.carsey@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Star Zeng <star.zeng@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
next prev parent reply other threads:[~2018-09-30 1:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-29 9:42 [PATCH] ShellPkg ShellLib.h: Fix wrong parameter name for ShellOpenFileByName Star Zeng
2018-09-30 1:11 ` Ni, Ruiyu
2018-09-30 1:20 ` Zeng, Star [this message]
2018-10-01 14:36 ` Carsey, Jaben
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=0C09AFA07DD0434D9E2A0C6AEB0483103BBF6357@shsmsx102.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