From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-in7.apple.com (mail-out7.apple.com [17.151.62.29]) (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 5EDCA82302 for ; Wed, 21 Dec 2016 10:59:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; d=apple.com; s=mailout2048s; c=relaxed/simple; q=dns/txt; i=@apple.com; t=1482346780; h=From:Sender:Reply-To:Subject:Date:Message-id:To:Cc:MIME-version:Content-type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-reply-to:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ASwdIPdEgK/IBEpmBfg+6obSOz4Wuwal4UAI7Cl9eLY=; b=fIYOb6ciJNrJ2Qo28G6ZF/PHz09CYzzRvfA4uB6OXtMmAl6Op4+VRZNIq6yEiAk8 B27sCBRuOaLQsUZYkyRo5dyY1qLHsNGgro/N0bOioQtzeX5CkFj8sGn+ASuLTbEL XH/ldoQNLOpg1cfDxvNrIUzuBOxmGSA4MrR6FQLKnyWUnsRbRyolWSlrQABHAELz vOslB15kDJz1DDigyY/m4zI3dH2pl+I0zEp2CQOEZrEIXoMfoZX9ScXzXQhkriD6 EqZBvI/asqZSUz3f2Gi4483ZRQSLjZGRlw6ZOV69HWRN2vFj244f8diyYcoSeQsA jsd0JsSOSh6LpV5/b6Uwug==; Received: from relay4.apple.com (relay4.apple.com [17.128.113.87]) by mail-in7.apple.com (Apple Secure Mail Relay) with SMTP id BB.49.07321.C11DA585; Wed, 21 Dec 2016 10:59:40 -0800 (PST) X-AuditID: 11973e16-5411e9a000001c99-cb-585ad11c792f Received: from nwk-mmpp-sz11.apple.com (nwk-mmpp-sz11.apple.com [17.128.115.155]) by relay4.apple.com (Apple SCV relay) with SMTP id 18.20.20305.B11DA585; Wed, 21 Dec 2016 10:59:39 -0800 (PST) MIME-version: 1.0 Received: from [17.153.27.116] by nwk-mmpp-sz11.apple.com (Oracle Communications Messaging Server 8.0.1.1.0 64bit (built Jun 15 2016)) with ESMTPSA id <0OIJ00FC8U3EW910@nwk-mmpp-sz11.apple.com>; Wed, 21 Dec 2016 10:59:39 -0800 (PST) Sender: afish@apple.com From: Andrew Fish Message-id: <7EADF448-803D-4F95-B458-5CD6CB1AF52D@apple.com> Date: Wed, 21 Dec 2016 10:59:38 -0800 In-reply-to: Cc: "edk2-devel@lists.01.org" To: GN Keshava References: X-Mailer: Apple Mail (2.3226) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrMLMWRmVeSWpSXmKPExsUi2FAYritzMSrC4MtyVos9h44yW7R/aWF1 YPLYOesuu0f37H8sAUxRXDYpqTmZZalF+nYJXBn9b48zFizawlixq+83SwPjzTmMXYycHBIC JhLL1m8Bsrk4hAT2MkrcWb+AHSbx43YLmC0kcIhR4vJdexCbV0BQ4sfkeywgNrNAmMThdVOY IJrfMUp0TV8ElhAWEJd4d2YTM4jNJqAssWL+B3aIZhuJeR1PGSFqIiXu/z4F1MzBwSKgKrHh mQRImFMgWOLuq05miPnmEjMufGECsUWASt7/3MAEcU+AxOoZG9lBWiUEZCVm//ICOUFC4DKb xK+2dcwTGIVmITl1FpJTIWwtie+PWoHiHEC2vMTB87IQYU2JZ/c+sUPY2hJP3l1gXcDItopR KDcxM0c3M89cL7GgICdVLzk/dxMjKBam24ntYHy4yuoQowAHoxIPr8OUqAgh1sSy4srcQ4zS HCxK4rxWDyIjhATSE0tSs1NTC1KL4otKc1KLDzEycXBKNTCG3Yj1v/7L/P3ivRrVXG+c/mku aWzbsGLr3t9HN9Q+tF06XSdP5JftCa35Pe6WfFxzv3/fI7Pr5Yrs66oW67OlXKV6bTO2FRwt +hbE9qy7JcJwrfn9/qizdbsu15xyPrhka+JUjcrUnZyCrMs1P5iIn/Gf4jY7grPl5db5wlMe RK94+j3iYl+NEktxRqKhFnNRcSIAk66Da2YCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrJIsWRmVeSWpSXmKPExsUi2FA8W1f6YlSEweMd1hZ7Dh1ltmj/0sLq wOSxc9Zddo/u2f9YApiiuGxSUnMyy1KL9O0SuDL63x5nLFi0hbFiV99vlgbGm3MYuxg5OSQE TCR+3G5hh7DFJC7cW88GYgsJHGKUuHzXHsTmFRCU+DH5HguIzSwQJnF43RSmLkYuoJp3jBJd 0xeBJYQFxCXendnEDGKzCShLrJj/gR2i2UZiXsdTRoiaSIn7v08BNXNwsAioSmx4JgES5hQI lrj7qpMZYr65xIwLX5hAbBGgkvc/NzBB3BMgsXrGRnaQVgkBWYnZv7wmMArMQnLdLCTXQdha Et8ftQLFOYBseYmD52UhwpoSz+59YoewtSWevLvAuoCRbRWjQFFqTmKliV5iQUFOql5yfu4m RnBIF4bvYPy3zOoQowAHoxIP74uJURFCrIllxZW5wBDiYFYS4f1yDCjEm5JYWZValB9fVJqT WnyIcSIj0IsTmaVEk/OBEZdXEm9oYmJgYmxsZmxsbmJOS2ElcV4LvogIIYH0xJLU7NTUgtQi mKOYODilGhgbs/51qy1Qvv17wnaZI3PWCnCueVvkNbk16EWMvMSMoyKze07azGq+W/JISuBn 028DMdbbkWd7wlhncltJ8nOzndC4cCmwYl2V2ePj/4NZjrLJ7Xd2n9sT+TwvbGOMXXphveoO 2eAJ+nwPF1Uu2bWok739J5fshleXDhzvOfvqs+IVgeZN1WlKLMUZiYZazEXFiQAqzx883AIA AA== X-Content-Filtered-By: Mailman/MimeDel 2.1.21 Subject: Re: LocateHandle for gEfiShellProtocolGuid is failing in my application 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: Wed, 21 Dec 2016 18:59:40 -0000 Content-Type: text/plain; CHARSET=US-ASCII Content-Transfer-Encoding: 7BIT > On Dec 20, 2016, at 11:32 PM, GN Keshava wrote: > > Hi, > > I'm developing a shell application. A call to LocateHandle for > gEfiShellProtocolGuid is failing with Status 0x0E. > > Below is my code. Please let me know what I'm doing wrong. > > Status = gBS->LocateHandle(ByProtocol, &gEfiShellProtocolGuid, NULL, > &BufferSize, Buffer); // Get BufferSize > if (EFI_ERROR(Status)) > Print(L"LocateHandle Status 0x%x\n",Status); > You can use %r with Print() to decode the error. https://github.com/tianocore/edk2/blob/master/MdePkg/Include/Library/PrintLib.h - r - The argument is a RETURN_STATUS value. This value is converted to a string following the table below. This does not follow ANSI C. - RETURN_SUCCESS - "Success" - RETURN_LOAD_ERROR - "Load Error" - RETURN_INVALID_PARAMETER - "Invalid Parameter" - RETURN_UNSUPPORTED - "Unsupported" - RETURN_BAD_BUFFER_SIZE - "Bad Buffer Size" - RETURN_BUFFER_TOO_SMALL - "Buffer Too Small" - RETURN_NOT_READY - "Not Ready" Thanks, Andrew Fish > Status = gBS->AllocatePool(EfiBootServicesData, BufferSize, > (void**)&Buffer); > if (EFI_ERROR(Status)) > Print(L"AllocatePool Status 0x%x\n",Status); > > Status = gBS->LocateHandle(ByProtocol, &gEfiShellProtocolGuid, NULL, > &BufferSize, Buffer); > if (EFI_ERROR(Status)) > Print(L"LocateHandle Status 0x%x\n",Status); > > All calls failing with Status being 0x0E. Please help me to solve this. Is > there any special requirement for using this protocol? > > Thanks. > Regards, > Keshava > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel