|
@@ -294,7 +294,13 @@ EfiShellGetMapFromDevicePath (
|
|
*DevicePath = NextDevicePathNode (*DevicePath);
|
|
*DevicePath = NextDevicePathNode (*DevicePath);
|
|
}
|
|
}
|
|
|
|
|
|
- SetDevicePathEndNode (*DevicePath);
|
|
|
|
|
|
+ //
|
|
|
|
+ // Do not call SetDevicePathEndNode() if the device path node is already the
|
|
|
|
+ // end of an entire device path.
|
|
|
|
+ //
|
|
|
|
+ if (!IsDevicePathEnd (*DevicePath)) {
|
|
|
|
+ SetDevicePathEndNode (*DevicePath);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
/*
|
|
/*
|