]> git.proxmox.com Git - mirror_edk2.git/commit - MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c
MdePkg: Handle USBxxx device path when optional para is not specified
authorDandan Bi <dandan.bi@intel.com>
Fri, 12 Oct 2018 02:18:27 +0000 (10:18 +0800)
committerLiming Gao <liming.gao@intel.com>
Wed, 24 Oct 2018 14:15:56 +0000 (22:15 +0800)
commit3874108034eb3f1d5d5180df33a5dfdd5fab5d25
tree858a95b94c39c8e968abf01fade10b6346237340
parent6d9b9bbb6148831de2ca545994f31e27b3d4c675
MdePkg: Handle USBxxx device path when optional para is not specified

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1243

According to UEFI spec,
for the Messaging Device Path with USB Class SubType, some paras
are optional in the text device path.
Take UsbClass(VID,PID,Class,SubClass,Protocol) for example,
The VID is an integer between 0 and 65535 and is optional. The
default value is 0xFFFF.
The PID is an integer between 0 and 65535 and is optional. The
default value is 0xFFFF.
The Class is an integer between 0 and 255 and is optional. The
default value is 0xFF.
The SubClass is an integer between 0 and 255 and is optional. The
default value is 0xFF.
The Protocol is an integer between 0 and 255 and is optional. The
default value is 0xFF.
So if any the optional para is not specified in the text device,
we should set related para in the node structure to default value.

This commit is to do the enhancement for USB Class device path
when optional para is not specified

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c