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:
niruiyu 2011-09-22 02:56:38 +00:00
parent ec99fa8efb
commit 9d4af8fce2
1 changed files with 6 additions and 1 deletions

View File

@ -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;
}
}