libefivar: Use VENDOR_DEVICE_PATH structure for Debug Port device path
When converting DebugPort device path from text,
current code use VENDOR_DEFINED_MESSAGING_DEVICE_PATH structure
for Debug port device node.
typedef struct {
EFI_DEVICE_PATH_PROTOCOL Header;
EFI_GUID Guid;
UINT8 VendorDefinedData[1];
} VENDOR_DEFINED_MESSAGING_DEVICE_PATH;
And Debugport Device Path is a vendor-defined messaging
device path with no data, only a GUID. So it's better to
use VENDOR_DEVICE_PATH to create the Debug port device node.
typedef struct {
EFI_DEVICE_PATH_PROTOCOL Header;
EFI_GUID Guid;
} VENDOR_DEVICE_PATH;
Upstream Bug: https://bugzilla.tianocore.org/show_bug.cgi?id=1229
Obtained from: 9343d0a1cd
Pull Request: https://github.com/freebsd/freebsd-src/pull/581
This commit is contained in:
parent
a51ae7212d
commit
9a62aa9329
@ -1876,12 +1876,12 @@ DevPathFromTextDebugPort (
|
|||||||
IN CHAR16 *TextDeviceNode
|
IN CHAR16 *TextDeviceNode
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
VENDOR_DEFINED_MESSAGING_DEVICE_PATH *Vend;
|
VENDOR_DEVICE_PATH *Vend;
|
||||||
|
|
||||||
Vend = (VENDOR_DEFINED_MESSAGING_DEVICE_PATH *) CreateDeviceNode (
|
Vend = (VENDOR_DEVICE_PATH *) CreateDeviceNode (
|
||||||
MESSAGING_DEVICE_PATH,
|
MESSAGING_DEVICE_PATH,
|
||||||
MSG_VENDOR_DP,
|
MSG_VENDOR_DP,
|
||||||
(UINT16) sizeof (VENDOR_DEFINED_MESSAGING_DEVICE_PATH)
|
(UINT16) sizeof (VENDOR_DEVICE_PATH)
|
||||||
);
|
);
|
||||||
|
|
||||||
CopyGuid (&Vend->Guid, &gEfiDebugPortProtocolGuid);
|
CopyGuid (&Vend->Guid, &gEfiDebugPortProtocolGuid);
|
||||||
|
Loading…
Reference in New Issue
Block a user