public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [shell] Problems in EfiShellGetGuidFromName
@ 2016-10-13 18:16 Tim Lewis
  2016-10-18 10:18 ` FW: " Tim Lewis
  0 siblings, 1 reply; 4+ messages in thread
From: Tim Lewis @ 2016-10-13 18:16 UTC (permalink / raw)
  To: edk2-devel-01

In EfiShellGetGuidFromName (ShellProtocol.c), we see:

EfiShellGetGuidFromName(
  IN  CONST CHAR16   *GuidName,
  OUT       EFI_GUID *Guid
  )
{
  EFI_GUID    *NewGuid;
  EFI_STATUS  Status;

  if (Guid == NULL || GuidName == NULL) {
    return (EFI_INVALID_PARAMETER);
  }

  Status = GetGuidFromStringName(GuidName, NULL, &NewGuid);
  if (!EFI_ERROR(Status)) {
    CopyGuid(NewGuid, Guid);
  }
  return (Status);

However, this doesn't work. Notice that CopyGuid places the output parameter as the 2nd parameter. But according to BaseMemoryLib:

GUID *
EFIAPI
CopyGuid (
  OUT GUID       *DestinationGuid,
  IN CONST GUID  *SourceGuid
  );

The destination should be the 1st parameter (not the second).





^ permalink raw reply	[flat|nested] 4+ messages in thread

* FW: [shell] Problems in EfiShellGetGuidFromName
  2016-10-13 18:16 [shell] Problems in EfiShellGetGuidFromName Tim Lewis
@ 2016-10-18 10:18 ` Tim Lewis
  2016-10-18 14:54   ` Carsey, Jaben
  2016-10-18 15:13   ` Carsey, Jaben
  0 siblings, 2 replies; 4+ messages in thread
From: Tim Lewis @ 2016-10-18 10:18 UTC (permalink / raw)
  To: edk2-devel@lists.01.org

Did anyone have a chance to look at this EFI_SHELL_PROTOCOL bug in the EDK2 implementation?

Thanks,

Tim

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Tim Lewis
Sent: Thursday, October 13, 2016 11:16 AM
To: edk2-devel-01 <edk2-devel@lists.01.org>
Subject: [edk2] [shell] Problems in EfiShellGetGuidFromName

In EfiShellGetGuidFromName (ShellProtocol.c), we see:

EfiShellGetGuidFromName(
  IN  CONST CHAR16   *GuidName,
  OUT       EFI_GUID *Guid
  )
{
  EFI_GUID    *NewGuid;
  EFI_STATUS  Status;

  if (Guid == NULL || GuidName == NULL) {
    return (EFI_INVALID_PARAMETER);
  }

  Status = GetGuidFromStringName(GuidName, NULL, &NewGuid);
  if (!EFI_ERROR(Status)) {
    CopyGuid(NewGuid, Guid);
  }
  return (Status);

However, this doesn't work. Notice that CopyGuid places the output parameter as the 2nd parameter. But according to BaseMemoryLib:

GUID *
EFIAPI
CopyGuid (
  OUT GUID       *DestinationGuid,
  IN CONST GUID  *SourceGuid
  );

The destination should be the 1st parameter (not the second).



_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [shell] Problems in EfiShellGetGuidFromName
  2016-10-18 10:18 ` FW: " Tim Lewis
@ 2016-10-18 14:54   ` Carsey, Jaben
  2016-10-18 15:13   ` Carsey, Jaben
  1 sibling, 0 replies; 4+ messages in thread
From: Carsey, Jaben @ 2016-10-18 14:54 UTC (permalink / raw)
  To: Tim Lewis, edk2-devel@lists.01.org; +Cc: Carsey, Jaben

I think you're right.  I guess that there are not lots of users of this function.

Can you submit a Bugzilla request?

> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> Tim Lewis
> Sent: Tuesday, October 18, 2016 3:18 AM
> To: edk2-devel@lists.01.org
> Subject: [edk2] FW: [shell] Problems in EfiShellGetGuidFromName
> Importance: High
> 
> Did anyone have a chance to look at this EFI_SHELL_PROTOCOL bug in the
> EDK2 implementation?
> 
> Thanks,
> 
> Tim
> 
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> Tim Lewis
> Sent: Thursday, October 13, 2016 11:16 AM
> To: edk2-devel-01 <edk2-devel@lists.01.org>
> Subject: [edk2] [shell] Problems in EfiShellGetGuidFromName
> 
> In EfiShellGetGuidFromName (ShellProtocol.c), we see:
> 
> EfiShellGetGuidFromName(
>   IN  CONST CHAR16   *GuidName,
>   OUT       EFI_GUID *Guid
>   )
> {
>   EFI_GUID    *NewGuid;
>   EFI_STATUS  Status;
> 
>   if (Guid == NULL || GuidName == NULL) {
>     return (EFI_INVALID_PARAMETER);
>   }
> 
>   Status = GetGuidFromStringName(GuidName, NULL, &NewGuid);
>   if (!EFI_ERROR(Status)) {
>     CopyGuid(NewGuid, Guid);
>   }
>   return (Status);
> 
> However, this doesn't work. Notice that CopyGuid places the output
> parameter as the 2nd parameter. But according to BaseMemoryLib:
> 
> GUID *
> EFIAPI
> CopyGuid (
>   OUT GUID       *DestinationGuid,
>   IN CONST GUID  *SourceGuid
>   );
> 
> The destination should be the 1st parameter (not the second).
> 
> 
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [shell] Problems in EfiShellGetGuidFromName
  2016-10-18 10:18 ` FW: " Tim Lewis
  2016-10-18 14:54   ` Carsey, Jaben
@ 2016-10-18 15:13   ` Carsey, Jaben
  1 sibling, 0 replies; 4+ messages in thread
From: Carsey, Jaben @ 2016-10-18 15:13 UTC (permalink / raw)
  To: Tim Lewis, edk2-devel@lists.01.org; +Cc: Carsey, Jaben

Never mind. Just saw patch.

> -----Original Message-----
> From: Carsey, Jaben
> Sent: Tuesday, October 18, 2016 7:54 AM
> To: 'Tim Lewis' <tim.lewis@insyde.com>; edk2-devel@lists.01.org
> Cc: Carsey, Jaben <jaben.carsey@intel.com>
> Subject: RE: [shell] Problems in EfiShellGetGuidFromName
> 
> I think you're right.  I guess that there are not lots of users of this function.
> 
> Can you submit a Bugzilla request?
> 
> > -----Original Message-----
> > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> > Tim Lewis
> > Sent: Tuesday, October 18, 2016 3:18 AM
> > To: edk2-devel@lists.01.org
> > Subject: [edk2] FW: [shell] Problems in EfiShellGetGuidFromName
> > Importance: High
> >
> > Did anyone have a chance to look at this EFI_SHELL_PROTOCOL bug in the
> > EDK2 implementation?
> >
> > Thanks,
> >
> > Tim
> >
> > -----Original Message-----
> > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> > Tim Lewis
> > Sent: Thursday, October 13, 2016 11:16 AM
> > To: edk2-devel-01 <edk2-devel@lists.01.org>
> > Subject: [edk2] [shell] Problems in EfiShellGetGuidFromName
> >
> > In EfiShellGetGuidFromName (ShellProtocol.c), we see:
> >
> > EfiShellGetGuidFromName(
> >   IN  CONST CHAR16   *GuidName,
> >   OUT       EFI_GUID *Guid
> >   )
> > {
> >   EFI_GUID    *NewGuid;
> >   EFI_STATUS  Status;
> >
> >   if (Guid == NULL || GuidName == NULL) {
> >     return (EFI_INVALID_PARAMETER);
> >   }
> >
> >   Status = GetGuidFromStringName(GuidName, NULL, &NewGuid);
> >   if (!EFI_ERROR(Status)) {
> >     CopyGuid(NewGuid, Guid);
> >   }
> >   return (Status);
> >
> > However, this doesn't work. Notice that CopyGuid places the output
> > parameter as the 2nd parameter. But according to BaseMemoryLib:
> >
> > GUID *
> > EFIAPI
> > CopyGuid (
> >   OUT GUID       *DestinationGuid,
> >   IN CONST GUID  *SourceGuid
> >   );
> >
> > The destination should be the 1st parameter (not the second).
> >
> >
> >
> > _______________________________________________
> > edk2-devel mailing list
> > edk2-devel@lists.01.org
> > https://lists.01.org/mailman/listinfo/edk2-devel
> > _______________________________________________
> > edk2-devel mailing list
> > edk2-devel@lists.01.org
> > https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-10-18 15:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-13 18:16 [shell] Problems in EfiShellGetGuidFromName Tim Lewis
2016-10-18 10:18 ` FW: " Tim Lewis
2016-10-18 14:54   ` Carsey, Jaben
2016-10-18 15:13   ` Carsey, Jaben

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox