From e974c97c3880954c22c8444279b2663406065621 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 1 Oct 1999 21:45:20 +0000 Subject: 1999-10-01 Roland McGrath * 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. --- term/devio.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'term/devio.c') 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 (); -- cgit v1.2.3