From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail1.bemta3.messagelabs.com (mail1.bemta3.messagelabs.com [195.245.230.162]) (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 AB02F1A1F4C for ; Thu, 8 Sep 2016 00:06:41 -0700 (PDT) Received: from [85.158.138.179] by server-2.bemta-3.messagelabs.com id BC/D0-01945-FFD01D75; Thu, 08 Sep 2016 07:06:39 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrHKsWRWlGSWpSXmKPExsViZ8MRqvuP92K 4wfGjchZ7Dh1lttjY9IfV4mXPanYHZo/Fe14yeXTP/scSwBTFmpmXlF+RwJrRPW0/e8HcXsaK 94s3Mzcw7m1i7GLk4hASaGWSmHzoN5RznFHi4NI5TF2MnEDOBUaJ9bO9QWw2AXuJFz07GUFsE YFsiUsLTzGD2MwCphKfPrwFqxcW8JNYNGUHVE2AxLdjU1ghbCuJe0vusIPYLAIqEh+PdgDFOT h4Bfwlru1UhNg7g1Hi34nFbCA1nAIhEpuXvwbrZRSQlfjSuBpql7jErSfzwXZJCIhIPLx4mg3 CFpV4+fgfK4RtILF16T4WCFtB4taMo6wQvT2MEhPeSoHYvAKCEidnPmGZwCg6C8nYWUjKZiEp g4hHSfzYs5t5FtDZzAKGEt/m6UGEtSWWLXwNFTaQ2H3WDFUYxLaWmPHrIBuErSgxpfsh+yxow L0++pFxASP3KkaN4tSistQiXSNjvaSizPSMktzEzBxdQwNjvdzU4uLE9NScxKRiveT83E2MwL ivZ2Bg3MHYt9fvEKMkB5OSKK9P8YVwIb6k/JTKjMTijPii0pzU4kOMMhwcShK8s3guhgsJFqW mp1akZeYAExBMWoKDR0mEdytImre4IDG3ODMdInWKUZdj1vI7a5mEWPLy81KlxHkVQYoEQIoy SvPgRsCS4SVGWSlhXkYGBgYhnoLUotzMElT5V4ziHIxKwrwLQKbwZOaVwG16BXQEE9ARQqfOg xxRkoiQkmpgFLkRp9vV0FvySuPhhGt7Pez+G3OlV0/e9+vKTebweVL+s+tj+sq/ayR8m//Usy e9iafm79l+Fodjkt8mHVE72yTlztJ2clm4+rHpW0w97pWJVO+xyOr7LLfoXMlSwcKoCz9nrky Zd0AwwiT1iGbXh+try2fsiTLW1mY+1x6SHSetHXD1yKk3SizFGYmGWsxFxYkADW+QWoEDAAA= X-Env-Sender: Nico.Schulz@ts.fujitsu.com X-Msg-Ref: server-7.tower-169.messagelabs.com!1473318398!679362!1 X-Originating-IP: [62.60.8.85] X-StarScan-Received: X-StarScan-Version: 8.84; banners=-,-,- X-VirusChecked: Checked Received: (qmail 28036 invoked from network); 8 Sep 2016 07:06:38 -0000 Received: from unknown (HELO mailhost4.uk.fujitsu.com) (62.60.8.85) by server-7.tower-169.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 8 Sep 2016 07:06:38 -0000 Received: from R01UKEXCASM221.r01.fujitsu.local (ex2k13_221.fs.fujitsu.com [10.182.185.119]) by mailhost4.uk.fujitsu.com (8.14.5/8.14.5) with ESMTP id u8875pUK009229 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Thu, 8 Sep 2016 08:05:51 +0100 Received: from R01UKEXCASM221.r01.fujitsu.local (10.182.185.119) by R01UKEXCASM221.r01.fujitsu.local (10.182.185.119) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Thu, 8 Sep 2016 08:06:33 +0100 Received: from R01UKEXCASM221.r01.fujitsu.local ([fe80::fd73:c2a5:3710:898c]) by R01UKEXCASM221.r01.fujitsu.local ([fe80::fd73:c2a5:3710:898c%23]) with mapi id 15.00.1178.000; Thu, 8 Sep 2016 08:06:33 +0100 From: "Nico.Schulz@ts.fujitsu.com" To: "ruiyu.ni@intel.com" , "edk2-devel@lists.01.org" CC: "jaben.carsey@intel.com" Thread-Topic: [PATCH] ShellPkg: More fallbacks + error handling in UefiShellLib Thread-Index: AdIIM9fTKQ4HHPJGRS6tb0zLVLHYYQAbgTwAAD9E74A= Date: Thu, 8 Sep 2016 07:06:33 +0000 Message-ID: <2853f2d4a2ef43179eb4f6393fd365ad@R01UKEXCASM221.r01.fujitsu.local> References: <734D49CCEBEEF84792F5B80ED585239D58D4DCB9@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <734D49CCEBEEF84792F5B80ED585239D58D4DCB9@SHSMSX103.ccr.corp.intel.com> Accept-Language: en-GB, en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.182.185.7] MIME-Version: 1.0 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 Subject: Re: [PATCH] ShellPkg: More fallbacks + error handling in UefiShellLib X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Sep 2016 07:06:42 -0000 Content-Language: en-US Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Hello Ray, Thanks for your response. I was not aware of this library, that sounds = like a very good idea. =20 But when having a look at it, there seem to be only file read/write/info operations. I cannot find a function that would give me a file handle = and open it. Especially for me it needs to be the device where also the = program is running (normally the boot device). Currently I use = ShellOpenFileByName() for this operation. I could not find anything like that, do you know = what is required to get a file handle and open the file properly? Is there any example that I am missing? =20 Also I am wondering why the ShellPkg library has fallbacks for almost = every function if they are not essentially required. It might make sense to = add my patch anyways to complete the fallbacks. But that is up to you, you = should know it best. =20 Cheers, Nico =20 =20 From: Ni, Ruiyu [mailto:ruiyu.ni@intel.com]=20 Sent: Wednesday, September 7, 2016 2:55 AM To: Schulz, Nico; edk2-devel@lists.01.org Cc: Carsey, Jaben Subject: RE: [PATCH] ShellPkg: More fallbacks + error handling in UefiShellLib =20 Nico, You want to develop an application which needs file system access = support but doesn=92t depend on Shell environment. So you link your application = to UefiShellLib and change the shell library to handle the case when it=92s = not in the Shell environment. Is my understanding correct? =20 If yes, I suggest you directly use MdePkg/Library/UefiFileHandleLib. It provides file system access support while doesn=92t depend on Shell environment. =20 It=92s a bit strange to remove the hard dependency of Shell environment = from Uefi*Shell*Lib. =20 Regards, Ray =20 From: Nico.Schulz@ts.fujitsu.com [mailto:Nico.Schulz@ts.fujitsu.com]=20 Sent: Tuesday, September 6, 2016 8:02 PM To: edk2-devel@lists.01.org Cc: Carsey, Jaben ; Ni, Ruiyu = Subject: [PATCH] ShellPkg: More fallbacks + error handling in = UefiShellLib =20 Dear edk2 developers, I=92ve made a patch in the edk2 ShellPkg CodeModule. It improves = compatibility when no Efi Shell is available. I=92ve noted all details on Github. To = not duplicate the information, please visit this link below. You can also = find and compare the code there: https://github.com/tianocore/edk2/pull/111 =20 It would be really nice if you can have a look at the patch. Some = further discussion might be required before this patch gets applied. Feedback is highly welcome. Thanks a lot J =20 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Nico Schulz nico.schulz@ts.fujitsu.com =20 Cheers, Nico =20