mirror of
https://github.com/tianocore/edk2
synced 2026-08-27 00:23:19 -04:00
ShellPkg/Shell: Preserve multi-instance device paths
EfiShellGetMapFromDevicePath() stops at any end-type node and converts an end-instance node into an end-entire node. This truncates a multi-instance device path and modifies the protocol data in place. Walk until the end-entire node instead. This leaves intermediate instances and the original device path unchanged. Signed-off-by: JinKang <2371488344@qq.com>
This commit is contained in:
parent
2c2f74a581
commit
cc9a0425a2
1 changed files with 1 additions and 9 deletions
|
|
@ -290,17 +290,9 @@ EfiShellGetMapFromDevicePath (
|
|||
}
|
||||
|
||||
if (PathForReturn != NULL) {
|
||||
while (!IsDevicePathEndType (*DevicePath)) {
|
||||
while (!IsDevicePathEnd (*DevicePath)) {
|
||||
*DevicePath = NextDevicePathNode (*DevicePath);
|
||||
}
|
||||
|
||||
//
|
||||
// Do not call SetDevicePathEndNode() if the device path node is already the
|
||||
// end of an entire device path.
|
||||
//
|
||||
if (!IsDevicePathEnd (*DevicePath)) {
|
||||
SetDevicePathEndNode (*DevicePath);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue