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,10 +193,14 @@ SerialRead (
|
||||||
if (SerialPortPoll()) {
|
if (SerialPortPoll()) {
|
||||||
Count = SerialPortRead (Buffer, *BufferSize);
|
Count = SerialPortRead (Buffer, *BufferSize);
|
||||||
*BufferSize = Count;
|
*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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
EFI_HANDLE gHandle = NULL;
|
EFI_HANDLE gHandle = NULL;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue