return Status;\r
}\r
//\r
- // Check the device handle, if it is a hot plug device,\r
+ // Check the device path, if it is a hot plug device,\r
// do not put the device path into ConInDev, and install\r
// gEfiConsoleInDeviceGuid to the device handle directly.\r
// The policy is, make hot plug device plug in and play immediately.\r
return Status;\r
}\r
//\r
- // Check the device handle, if it is a hot plug device,\r
+ // Check the device path, if it is a hot plug device,\r
// do not put the device path into ConOutDev and ErrOutDev,\r
// and install gEfiConsoleOutDeviceGuid to the device handle directly.\r
// The policy is, make hot plug device plug in and play immediately.\r
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath\r
)\r
{\r
- //\r
- // Check device whether is hot plug device or not throught Device Path\r
- // \r
- if ((DevicePathType (DevicePath) == MESSAGING_DEVICE_PATH) &&\r
- (DevicePathSubType (DevicePath) == MSG_USB_DP ||\r
- DevicePathSubType (DevicePath) == MSG_USB_CLASS_DP ||\r
- DevicePathSubType (DevicePath) == MSG_USB_WWID_DP)) {\r
- //\r
- // If Device is USB device\r
- //\r
- return TRUE;\r
- }\r
- if ((DevicePathType (DevicePath) == HARDWARE_DEVICE_PATH) &&\r
- (DevicePathSubType (DevicePath) == HW_PCCARD_DP)) {\r
- //\r
- // If Device is PCCard\r
+ EFI_DEVICE_PATH_PROTOCOL *CheckDevicePath;\r
+\r
+ CheckDevicePath = DevicePath;\r
+ while (!IsDevicePathEnd (CheckDevicePath)) {\r
//\r
- return TRUE;\r
+ // Check device whether is hot plug device or not throught Device Path\r
+ // \r
+ if ((DevicePathType (CheckDevicePath) == MESSAGING_DEVICE_PATH) &&\r
+ (DevicePathSubType (CheckDevicePath) == MSG_USB_DP ||\r
+ DevicePathSubType (CheckDevicePath) == MSG_USB_CLASS_DP ||\r
+ DevicePathSubType (CheckDevicePath) == MSG_USB_WWID_DP)) {\r
+ //\r
+ // If Device is USB device\r
+ //\r
+ return TRUE;\r
+ }\r
+ if ((DevicePathType (CheckDevicePath) == HARDWARE_DEVICE_PATH) &&\r
+ (DevicePathSubType (CheckDevicePath) == HW_PCCARD_DP)) {\r
+ //\r
+ // If Device is PCCard\r
+ //\r
+ return TRUE;\r
+ }\r
+ \r
+ CheckDevicePath = NextDevicePathNode (CheckDevicePath);\r
}\r
\r
return FALSE;\r