From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.31; helo=mga06.intel.com; envelope-from=star.zeng@intel.com; receiver=edk2-devel@lists.01.org Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5CD802115F51D for ; Sat, 29 Sep 2018 18:22:38 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Sep 2018 18:22:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,322,1534834800"; d="scan'208";a="90766796" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga002.fm.intel.com with ESMTP; 29 Sep 2018 18:20:33 -0700 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sat, 29 Sep 2018 18:20:30 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sat, 29 Sep 2018 18:20:30 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.140]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.245]) with mapi id 14.03.0319.002; Sun, 30 Sep 2018 09:20:28 +0800 From: "Zeng, Star" To: "Ni, Ruiyu" , "edk2-devel@lists.01.org" CC: "Carsey, Jaben" , "Zeng, Star" Thread-Topic: [PATCH] ShellPkg ShellLib.h: Fix wrong parameter name for ShellOpenFileByName Thread-Index: AQHUV9jXsxqE/2PUykOIJFJDQiA866UHf0GAgACHfzA= Date: Sun, 30 Sep 2018 01:20:27 +0000 Message-ID: <0C09AFA07DD0434D9E2A0C6AEB0483103BBF6357@shsmsx102.ccr.corp.intel.com> References: <1538214178-53964-1-git-send-email-star.zeng@intel.com> <734D49CCEBEEF84792F5B80ED585239D5BE59961@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <734D49CCEBEEF84792F5B80ED585239D5BE59961@SHSMSX104.ccr.corp.intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] ShellPkg ShellLib.h: Fix wrong parameter name for ShellOpenFileByName X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Sep 2018 01:22:38 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Ray, Thanks. I did not check the detail. But at least, one of definition and implementat= ion 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=20 Sent: Sunday, September 30, 2018 9:12 AM To: Zeng, Star ; edk2-devel@lists.01.org Cc: Carsey, Jaben Subject: RE: [PATCH] ShellPkg ShellLib.h: Fix wrong parameter name for Shel= lOpenFileByName Star, Per my understanding, FilePath means the full path pointing to the file, Fi= leName 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 ; Ni, Ruiyu ;=20 > Carsey, Jaben > Subject: [PATCH] ShellPkg ShellLib.h: Fix wrong parameter name for=20 > ShellOpenFileByName >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1221 >=20 > The parameter name FilePath should be FileName. >=20 > I am trying to write an application for my own use and want to use=20 > this interface, but confused by the parameter name. >=20 > Interesting, the implementation in UefiShellLib.c is correct. >=20 > Cc: Ruiyu Ni > Cc: Jaben Carsey > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Star Zeng > --- > ShellPkg/Include/Library/ShellLib.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > 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. >=20 > - @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=20 > 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