summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--term/ChangeLog6
-rw-r--r--term/hurdio.c11
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. */