UefiDevicePathLibCatPrint (Str, L"VenVt100Plus()");\r
return ;\r
} else if (CompareGuid (&Vendor->Guid, &gEfiVTUTF8Guid)) {\r
- UefiDevicePathLibCatPrint (Str, L"VenUft8()");\r
+ UefiDevicePathLibCatPrint (Str, L"VenUtf8()");\r
return ;\r
} else if (CompareGuid (&Vendor->Guid, &gEfiUartDevicePathGuid)) {\r
FlowControlMap = (((UART_FLOW_CONTROL_DEVICE_PATH *) Vendor)->FlowControlMap);\r
UIDStr = HIDStr + AsciiStrLen (HIDStr) + 1;\r
CIDStr = UIDStr + AsciiStrLen (UIDStr) + 1;\r
\r
+ if (DisplayOnly) {\r
+ if ((EISA_ID_TO_NUM (AcpiEx->HID) == 0x0A03) ||\r
+ (EISA_ID_TO_NUM (AcpiEx->CID) == 0x0A03 && EISA_ID_TO_NUM (AcpiEx->HID) != 0x0A08)) {\r
+ if (AcpiEx->UID == 0) {\r
+ UefiDevicePathLibCatPrint (Str, L"PciRoot(%a)", UIDStr);\r
+ } else {\r
+ UefiDevicePathLibCatPrint (Str, L"PciRoot(0x%x)", AcpiEx->UID);\r
+ }\r
+ return;\r
+ }\r
+\r
+ if (EISA_ID_TO_NUM (AcpiEx->HID) == 0x0A08 || EISA_ID_TO_NUM (AcpiEx->CID) == 0x0A08) {\r
+ if (AcpiEx->UID == 0) {\r
+ UefiDevicePathLibCatPrint (Str, L"PcieRoot(%a)", UIDStr);\r
+ } else {\r
+ UefiDevicePathLibCatPrint (Str, L"PcieRoot(0x%x)", AcpiEx->UID);\r
+ }\r
+ return;\r
+ }\r
+ }\r
+\r
//\r
// Converts EISA identification to string.\r
//\r
(AcpiEx->CID >> 16) & 0xFFFF\r
);\r
\r
- if ((*HIDStr == '\0') && (*CIDStr == '\0') && (AcpiEx->UID == 0)) {\r
+ if ((*HIDStr == '\0') && (*CIDStr == '\0') && (*UIDStr != '\0')) {\r
//\r
// use AcpiExp()\r
//\r
- UefiDevicePathLibCatPrint (\r
- Str,\r
- L"AcpiExp(%s,%s,%a)",\r
- HIDText,\r
- CIDText,\r
- UIDStr\r
- );\r
+ if (AcpiEx->CID == 0) {\r
+ UefiDevicePathLibCatPrint (\r
+ Str,\r
+ L"AcpiExp(%s,0,%a)",\r
+ HIDText,\r
+ UIDStr\r
+ );\r
+ } else {\r
+ UefiDevicePathLibCatPrint (\r
+ Str,\r
+ L"AcpiExp(%s,%s,%a)",\r
+ HIDText,\r
+ CIDText,\r
+ UIDStr\r
+ );\r
+ }\r
} else {\r
- if (AllowShortcuts) {\r
+ if (DisplayOnly) {\r
//\r
// display only\r
//\r
UefiDevicePathLibCatPrint (Str, L"AcpiEx(%s,", HIDText);\r
}\r
\r
- if (AcpiEx->UID == 0) {\r
- UefiDevicePathLibCatPrint (Str, L"%a,", UIDStr);\r
+ if (AcpiEx->CID == 0) {\r
+ UefiDevicePathLibCatPrint (Str, L"%a,", CIDStr);\r
} else {\r
- UefiDevicePathLibCatPrint (Str, L"0x%x,", AcpiEx->UID);\r
+ UefiDevicePathLibCatPrint (Str, L"%s,", CIDText);\r
}\r
\r
- if (AcpiEx->CID == 0) {\r
- UefiDevicePathLibCatPrint (Str, L"%a)", CIDStr);\r
+ if (AcpiEx->UID == 0) {\r
+ UefiDevicePathLibCatPrint (Str, L"%a)", UIDStr);\r
} else {\r
- UefiDevicePathLibCatPrint (Str, L"%s)", CIDText);\r
+ UefiDevicePathLibCatPrint (Str, L"0x%x)", AcpiEx->UID);\r
}\r
} else {\r
UefiDevicePathLibCatPrint (\r
\r
SerialNumberStr = (CHAR16 *) ((UINT8 *) UsbWWId + sizeof (USB_WWID_DEVICE_PATH));\r
Length = (UINT16) ((DevicePathNodeLength ((EFI_DEVICE_PATH_PROTOCOL *) UsbWWId) - sizeof (USB_WWID_DEVICE_PATH)) / sizeof (CHAR16));\r
- if (SerialNumberStr [Length - 1] != 0) {\r
+ if (Length >= 1 && SerialNumberStr [Length - 1] != 0) {\r
//\r
// In case no NULL terminator in SerialNumber, create a new one with NULL terminator\r
//\r