summaryrefslogtreecommitdiff
path: root/term/hurdio.c
diff options
context:
space:
mode:
authorMarcus Brinkmann <marcus@gnu.org>2002-09-10 17:26:18 +0000
committerMarcus Brinkmann <marcus@gnu.org>2002-09-10 17:26:18 +0000
commitf7aba072f48ed17386ae9369551a49aca4cf73aa (patch)
treead5659695037f3c6c13115f89e87e55f2aa50901 /term/hurdio.c
parent5fe2b9242a4518cc957b3ccb955dfee3172245e5 (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.
Diffstat (limited to 'term/hurdio.c')
-rw-r--r--term/hurdio.c11
1 files changed, 5 insertions, 6 deletions
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. */