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.100; helo=mga07.intel.com; envelope-from=jaben.carsey@intel.com; receiver=edk2-devel@lists.01.org Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 3118F2116120E for ; Mon, 1 Oct 2018 07:36:37 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Oct 2018 07:36:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,328,1534834800"; d="scan'208";a="77553930" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga007.jf.intel.com with ESMTP; 01 Oct 2018 07:36:36 -0700 Received: from fmsmsx154.amr.corp.intel.com (10.18.116.70) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 1 Oct 2018 07:36:36 -0700 Received: from fmsmsx103.amr.corp.intel.com ([169.254.2.16]) by FMSMSX154.amr.corp.intel.com ([169.254.6.126]) with mapi id 14.03.0319.002; Mon, 1 Oct 2018 07:36:36 -0700 From: "Carsey, Jaben" To: "Zeng, Star" , "Ni, Ruiyu" , "edk2-devel@lists.01.org" Thread-Topic: [PATCH] ShellPkg ShellLib.h: Fix wrong parameter name for ShellOpenFileByName Thread-Index: AQHUV9jWsXy+kOtlH0e0mnOHpnpbR6UIeraAgAACeoCAAfqGcA== Date: Mon, 1 Oct 2018 14:36:35 +0000 Message-ID: References: <1538214178-53964-1-git-send-email-star.zeng@intel.com> <734D49CCEBEEF84792F5B80ED585239D5BE59961@SHSMSX104.ccr.corp.intel.com> <0C09AFA07DD0434D9E2A0C6AEB0483103BBF6357@shsmsx102.ccr.corp.intel.com> In-Reply-To: <0C09AFA07DD0434D9E2A0C6AEB0483103BBF6357@shsmsx102.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYjU5MmE2ZDktY2E0NS00OWI4LTk3NGYtZGNiMWYzNDJiZWJmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiaUxHWDFyZkRhMlA1RWppRTRcL0MyOCs0YTRZWFVhY1FZd1MrRnR2bk9jYkoxdTZWS1NZZ1EwQWZsSjdVU2M3NmkifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.1.200.107] 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: Mon, 01 Oct 2018 14:36:38 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I think we need to update description. I guess that OpenFileByName may sear= ch CWD and or PATH, but DevicePath is absolute and therefore will not.. > -----Original Message----- > From: Zeng, Star > Sent: Saturday, September 29, 2018 6:20 PM > To: Ni, Ruiyu ; edk2-devel@lists.01.org > Cc: Carsey, Jaben ; Zeng, Star > > Subject: RE: [PATCH] ShellPkg ShellLib.h: Fix wrong parameter name for > ShellOpenFileByName > Importance: High >=20 > Ray, >=20 > Thanks. >=20 > I did not check the detail. But at least, one of definition and implement= ation > needs to be updated. Maybe the description need to be enhanced also as > you described. >=20 > ShellLib.h: >=20 > EFI_STATUS > EFIAPI > ShellOpenFileByDevicePath( > IN OUT EFI_DEVICE_PATH_PROTOCOL **FilePath, > OUT SHELL_FILE_HANDLE *FileHandle, > IN UINT64 OpenMode, > IN UINT64 Attributes > ); >=20 > EFI_STATUS > EFIAPI > ShellOpenFileByName( > IN CONST CHAR16 *FilePath, > OUT SHELL_FILE_HANDLE *FileHandle, > IN UINT64 OpenMode, > IN UINT64 Attributes > ); >=20 >=20 > UefiShellLib.c: >=20 > EFI_STATUS > EFIAPI > ShellOpenFileByDevicePath( > IN OUT EFI_DEVICE_PATH_PROTOCOL **FilePath, > OUT SHELL_FILE_HANDLE *FileHandle, > IN UINT64 OpenMode, > IN UINT64 Attributes > ) >=20 > EFI_STATUS > EFIAPI > ShellOpenFileByName( > IN CONST CHAR16 *FileName, > OUT SHELL_FILE_HANDLE *FileHandle, > IN UINT64 OpenMode, > IN UINT64 Attributes > ) >=20 > Star > -----Original Message----- > From: Ni, Ruiyu > 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 > ShellOpenFileByName >=20 > 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. >=20 > So I think only specifying FileName is not enough to identify a file. > The parameter name should be fine. >=20 > > -----Original Message----- > > From: Zeng, Star > > Sent: Saturday, September 29, 2018 5:43 PM > > To: edk2-devel@lists.01.org > > Cc: Zeng, Star ; Ni, Ruiyu ; > > Carsey, Jaben > > Subject: [PATCH] ShellPkg ShellLib.h: Fix wrong parameter name for > > ShellOpenFileByName > > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1221 > > > > 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 > > 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(-) > > > > 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