public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Tim Lewis <tim.lewis@insyde.com>
To: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: FW: [shell] Problems in EfiShellGetGuidFromName
Date: Tue, 18 Oct 2016 10:18:26 +0000	[thread overview]
Message-ID: <7236196A5DF6C040855A6D96F556A53F3F84EF@msmail.insydesw.com.tw> (raw)
In-Reply-To: <7236196A5DF6C040855A6D96F556A53F3F660F@msmail.insydesw.com.tw>

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


  reply	other threads:[~2016-10-18 10:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-13 18:16 [shell] Problems in EfiShellGetGuidFromName Tim Lewis
2016-10-18 10:18 ` Tim Lewis [this message]
2016-10-18 14:54   ` Carsey, Jaben
2016-10-18 15:13   ` Carsey, Jaben

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=7236196A5DF6C040855A6D96F556A53F3F84EF@msmail.insydesw.com.tw \
    --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