mirror of https://github.com/acidanthera/audk.git
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:
parent
420462d0fb
commit
f65dc3bebd
|
@ -193,8 +193,12 @@ SerialRead (
|
|||
if (SerialPortPoll()) {
|
||||
Count = SerialPortRead (Buffer, *BufferSize);
|
||||
*BufferSize = Count;
|
||||
return (Count == 0) ? EFI_DEVICE_ERROR : EFI_SUCCESS;
|
||||
}
|
||||
return (Count == 0) ? EFI_DEVICE_ERROR : EFI_SUCCESS;
|
||||
|
||||
// No data to return
|
||||
*BufferSize = 0;
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue