-/**\r
- Computes and returns the size, in bytes, of a device path.\r
-\r
- @param DevicePath A pointer to a device path.\r
-\r
- @return The size, in bytes, of DevicePath.\r
-\r
-**/\r
-UINTN\r
-InternalReportStatusCodeDevicePathSize (\r
- IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath\r
- )\r
-{\r
- CONST EFI_DEVICE_PATH_PROTOCOL *Start;\r
-\r
- //\r
- // Search for the end of the device path structure\r
- //\r
- Start = DevicePath;\r
- while (!EfiIsDevicePathEnd (DevicePath)) {\r
- DevicePath = EfiNextDevicePathNode (DevicePath);\r
- }\r
-\r
- //\r
- // Subtract the start node from the end node and add in the size of the end node\r
- //\r
- return ((UINTN) DevicePath - (UINTN) Start) + DevicePathNodeLength (DevicePath);\r
-}\r
-\r
-\r