From: GN Keshava <keshava.gn@gmail.com>
To: "Carsey, Jaben" <jaben.carsey@intel.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: LocateHandle for gEfiShellProtocolGuid is failing in my application
Date: Thu, 22 Dec 2016 09:35:47 +0000 [thread overview]
Message-ID: <CABKwMdvAm2s+oxAB7ftaWj822Msz1tOSxVEVxKoA52hL7nnOVw@mail.gmail.com> (raw)
In-Reply-To: <CB6E33457884FA40993F35157061515C54B2D942@FMSMSX103.amr.corp.intel.com>
Hi Jaben,
*>> Is there a reason that you are not using ShellLib to facilitate your
app functionality? That library makes lots of things a lot easier.*
I want to use EFI_SHELL_PROTOCOL->GetMapFromDevicePath in my app. Is there
any way to use it using ShellLib ?
*>> Why do you use LocateHandle and not LocateProtocol?*
Got LocateHandle in my reference. I would like to know more about
difference and usage of these in different scenario.
*>> Are you running the UEFI Shell and then your application?*
Yes. I'm running my application from UEFI shell as :
*fs1:\> MyApp.exe Arg1 Arg2*
Thanks for the help..
Regards,
Keshava
On Thu, 22 Dec 2016 at 00:06 Carsey, Jaben <jaben.carsey@intel.com> wrote:
> Hi Keshava,
>
> few questions:
> Is there a reason that you are not using ShellLib to facilitate your app
> functionality? That library makes lots of things a lot easier.
> Why do you use LocateHandle and not LocateProtocol?
> Are you sure about that return code? Usually most-sig-bit is set for
> error returns.
>
> Does the following snippet of code find a valid instance?
>
> Status = gBS->LocateProtocol(
> &gEfiShellProtocolGuid,
> NULL,
> (VOID **)&gEfiShellProtocol
> );
> if (EFI_ERROR(Status)) {
> gEfiShellProtocol = NULL;
> }
>
> Are you running the UEFI Shell and then your application?
>
>
> -Jaben
>
>
>
>
> > -----Original Message-----
> > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> > GN Keshava
> > Sent: Tuesday, December 20, 2016 11:32 PM
> > To: edk2-devel@lists.01.org
> > Subject: [edk2] LocateHandle for gEfiShellProtocolGuid is failing in my
> > application
> > Importance: High
> >
> > 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);
> >
> > 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
>
next prev parent reply other threads:[~2016-12-22 9:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-21 7:32 LocateHandle for gEfiShellProtocolGuid is failing in my application GN Keshava
2016-12-21 18:36 ` Carsey, Jaben
2016-12-22 9:35 ` GN Keshava [this message]
2016-12-22 10:07 ` GN Keshava
2016-12-22 16:56 ` Carsey, Jaben
2016-12-23 4:06 ` GN Keshava
2016-12-27 23:28 ` Carsey, Jaben
2016-12-28 4:16 ` GN Keshava
2016-12-28 14:56 ` Carsey, Jaben
2016-12-21 18:59 ` Andrew Fish
2016-12-21 19:13 ` Andrew Fish
2016-12-22 2:00 ` GN Keshava
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=CABKwMdvAm2s+oxAB7ftaWj822Msz1tOSxVEVxKoA52hL7nnOVw@mail.gmail.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