summaryrefslogtreecommitdiff
path: root/term/devio.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1999-10-01 21:45:20 +0000
committerRoland McGrath <roland@gnu.org>1999-10-01 21:45:20 +0000
commite974c97c3880954c22c8444279b2663406065621 (patch)
treeeff6498b5e2c391febe50652af00ab59569a6ef4 /term/devio.c
parent571422c27c919de580d9a44b821ced09f3f69d6f (diff)
1999-10-01 Roland McGrath <roland@baalperazim.frob.com>
* term.h (NO_DEVICE): New macro, bit for termflags. (termflags): Change type to uint_fast32_t. * devio.c (device_open_reply): For D_NO_SUCH_DEVICE error reply, set NO_DEVICE flag in termflags. * users.c (open_hook): If NO_DEVICE flag set, return ENXIO immediately. If we put out an open request, check for that bit as well as NO_CARRIER changing in termflags and diagnose with ENXIO. * Makefile (device_replyServer-CPPFLAGS): New variable, turn off TypeCheck for this stub. This is necessary for error replies to get through to our server-side functions in devio.c.
Diffstat (limited to 'term/devio.c')
-rw-r--r--term/devio.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/term/devio.c b/term/devio.c
index ed9df066..ce12b085 100644
--- a/term/devio.c
+++ b/term/devio.c
@@ -506,6 +506,13 @@ device_open_reply (mach_port_t replyport,
if (returncode != 0)
{
+ /* Note that DEVICE is total garbage (not a real port name at all!)
+ in this case. */
+
+ if (returncode == D_NO_SUCH_DEVICE)
+ /* Record that the device does not exist. */
+ termflags |= NO_DEVICE;
+
/* Bogus. */
report_carrier_on ();
report_carrier_off ();