at EOF.
* ser-base.c (do_ser_base_readchar): Return SERIAL_EOF when
read_prim returns zero, not SERIAL_TIMEOUT.
+2007-10-12 Jim Blandy <jimb@codesourcery.com>
+
+ * 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.
+
2007-10-12 Ulrich Weigand <uweigand@de.ibm.com>
* alpha-mdebug-tdep.c: Include "gdb_string.h".
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;
interesting. */
void (*async) (struct serial *scb, int async_p);
/* Perform a low-level read operation, reading (at most) COUNT
- bytes into SCB->BUF. */
+ bytes into SCB->BUF. Return zero at end of file. */
int (*read_prim)(struct serial *scb, size_t count);
/* Perform a low-level write operation, writing (at most) COUNT
bytes from BUF. */