mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 14:49:38 +08:00
* serial.h (struct serial_ops): Document read_prim to return zero
at EOF. * ser-base.c (do_ser_base_readchar): Return SERIAL_EOF when read_prim returns zero, not SERIAL_TIMEOUT.
This commit is contained in:
@ -279,9 +279,7 @@ do_ser_base_readchar (struct serial *scb, int timeout)
|
||||
if (status <= 0)
|
||||
{
|
||||
if (status == 0)
|
||||
/* 0 chars means timeout. (We may need to distinguish between EOF
|
||||
& timeouts someday.) */
|
||||
return SERIAL_TIMEOUT;
|
||||
return SERIAL_EOF;
|
||||
else
|
||||
/* Got an error from read. */
|
||||
return SERIAL_ERROR;
|
||||
|
Reference in New Issue
Block a user