Fix typedef of EFI_PXE_BASE_CODE

Commit 751cbce3 fixed up a bunch of types to better match the edk2
definitions and the names in the UEFI Spec, but while doing so
inadvertantly defined things thusly:

  INTERFACE_DECL(_EFI_PXE_BASE_CODE_PROTOCOL);
  ...
  typedef struct _EFI_PXE_BASE_CODE_PROTOCOL {
  ...
  } EFI_PXE_BASE_CODE_PROTOCOL;
  ...
  typedef struct _EFI_PXE_BASE_CODE_PROTOCOL _EFI_PXE_BASE_CODE;
  typedef struct EFI_PXE_BASE_CODE_PROTOCOL EFI_PXE_BASE_CODE;

Because EFI_BASE_CODE_PROTOCOL is declared with a typedef, and is
therefore in the type namespace rather than the struct namespace, this
results in EFI_PXE_BASE_CODE being a forward declaration of an
incomplete type.  The net result is that code which dereferences any
field in the struct, even with the correct names, will not correctly
build.

This patch changes both _EFI_PXE_BASE_CODE and EFI_PXE_BASE_CODE
typedefs to inherit from struct _EFI_PXE_BASE_CODE_PROTOCOL.

Signed-off-by: Peter Jones <pjones@redhat.com>
Signed-off-by: Nigel Croxon <ncroxon@redhat.com>
This commit is contained in:
Peter Jones 2018-03-13 15:20:25 -04:00 committed by Nigel Croxon
parent 25cebcee2a
commit 28b487d1ae

View File

@ -419,7 +419,7 @@ typedef struct _EFI_PXE_BASE_CODE_PROTOCOL {
// Use 'EFI_PXE_BASE_CODE_PROTOCOL_GUID' instead.
typedef struct _EFI_PXE_BASE_CODE_PROTOCOL _EFI_PXE_BASE_CODE;
typedef EFI_PXE_BASE_CODE_PROTOCOL EFI_PXE_BASE_CODE;
typedef struct _EFI_PXE_BASE_CODE_PROTOCOL EFI_PXE_BASE_CODE;
//
// Call Back Definitions