mirror of https://github.com/acidanthera/audk.git
Return empty string when END device path is passed in to align the original behavior in order to keep backward compatibility.
Signed-off-by: niruiyu Reviewed-by: erictian git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12402 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
ec99fa8efb
commit
9d4af8fce2
|
@ -1875,6 +1875,7 @@ ConvertDeviceNodeToText (
|
|||
//
|
||||
DumpNode (&Str, (VOID *) DeviceNode, DisplayOnly, AllowShortcuts);
|
||||
|
||||
ASSERT (Str.Str != NULL);
|
||||
return Str.Str;
|
||||
}
|
||||
|
||||
|
@ -1959,5 +1960,9 @@ ConvertDevicePathToText (
|
|||
DevPathNode = NextDevicePathNode (DevPathNode);
|
||||
}
|
||||
|
||||
return Str.Str;
|
||||
if (Str.Str == NULL) {
|
||||
return AllocateZeroPool (sizeof (CHAR16));
|
||||
} else {
|
||||
return Str.Str;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue