diff options
author | Jim Blandy <jimb@codesourcery.com> | 2007-10-12 20:14:57 +0000 |
---|---|---|
committer | Jim Blandy <jimb@codesourcery.com> | 2007-10-12 20:14:57 +0000 |
commit | d41ebd5d4581711edf913325b602d70dbf98bc51 (patch) | |
tree | b5e47739d34026984b6f9824cbdb68006913b71b /gdb/ser-base.c | |
parent | e03748586c49e8ad61ee2e4103668eb4ba3fc0e3 (diff) | |
download | gdb-d41ebd5d4581711edf913325b602d70dbf98bc51.zip gdb-d41ebd5d4581711edf913325b602d70dbf98bc51.tar.gz gdb-d41ebd5d4581711edf913325b602d70dbf98bc51.tar.bz2 |
* 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.
Diffstat (limited to 'gdb/ser-base.c')
-rw-r--r-- | gdb/ser-base.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/gdb/ser-base.c b/gdb/ser-base.c index f0f5b57..8fdfd25 100644 --- a/gdb/ser-base.c +++ b/gdb/ser-base.c @@ -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; |