diff options
author | Marcus Brinkmann <marcus@gnu.org> | 2002-09-10 17:26:18 +0000 |
---|---|---|
committer | Marcus Brinkmann <marcus@gnu.org> | 2002-09-10 17:26:18 +0000 |
commit | f7aba072f48ed17386ae9369551a49aca4cf73aa (patch) | |
tree | ad5659695037f3c6c13115f89e87e55f2aa50901 | |
parent | 5fe2b9242a4518cc957b3ccb955dfee3172245e5 (diff) |
2002-09-10 Marcus Brinkmann <marcus@gnu.org>
* hurdio.c (hurdio_writer_loop): Desert the DTR on all errors, not
only EIO.
(hurdio_reader_loop): Likewise.
-rw-r--r-- | term/ChangeLog | 6 | ||||
-rw-r--r-- | term/hurdio.c | 11 |
2 files changed, 11 insertions, 6 deletions
diff --git a/term/ChangeLog b/term/ChangeLog index f107b8cc..0f43ab21 100644 --- a/term/ChangeLog +++ b/term/ChangeLog @@ -1,3 +1,9 @@ +2002-09-10 Marcus Brinkmann <marcus@gnu.org> + + * hurdio.c (hurdio_writer_loop): Desert the DTR on all errors, not + only EIO. + (hurdio_reader_loop): Likewise. + 2002-08-18 Roland McGrath <roland@frob.com> * main.c (main): Open with O_RDWR only for hurdio bottomhalf. diff --git a/term/hurdio.c b/term/hurdio.c index ce5e169b..2dfbacef 100644 --- a/term/hurdio.c +++ b/term/hurdio.c @@ -198,10 +198,10 @@ hurdio_reader_loop (any_t arg) err = io_read (ioport, &data, &datalen, -1, BUFFER_SIZE); mutex_lock (&global_lock); - /* EIO or EOF can mean the carrier has been dropped. */ - if (err == EIO || !datalen) + /* Error or EOF can mean the carrier has been dropped. */ + if (err || !datalen) hurdio_desert_dtr (); - else if (!err) + else { if (termstate.c_cflag & CREAD) { @@ -291,10 +291,9 @@ hurdio_writer_loop (any_t arg) mach_port_mod_refs (mach_task_self (), ioport_copy, MACH_PORT_RIGHT_SEND, -1); - /* XXX Handle errors correctly. */ - if (err == EIO) + if (err) hurdio_desert_dtr (); - else if (!err) + else { /* Note that npending_output might be set to null in the meantime by hurdio_abandon_physical_output. */ |