Fix bug in SerialRead returning error if no data was present.

No data should not be an error return. Causing lots of REPORT_STATUS_CODE messages out of the TerminalDxe driver.

Signed-off-by: andrewfish
Reviewed-by: andrewfish



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11770 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
andrewfish 2011-06-08 21:12:11 +00:00
parent 420462d0fb
commit f65dc3bebd
1 changed files with 5 additions and 1 deletions

View File

@ -193,8 +193,12 @@ SerialRead (
if (SerialPortPoll()) {
Count = SerialPortRead (Buffer, *BufferSize);
*BufferSize = Count;
}
return (Count == 0) ? EFI_DEVICE_ERROR : EFI_SUCCESS;
}
// No data to return
*BufferSize = 0;
return EFI_SUCCESS;
}