From e8254937eb64eabd1ce7b48b96b7ff5f1959f6ca Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 30 May 1999 01:48:12 +0000 Subject: 1999-05-24 Mark Kettenis * devio.c: Include , and . Do not include and . Reorganize the order of inclusion of the header files a bit and document the baud-rate hackery. Include explicitely. (init_devio): Use new local variable ERR instead of ERRNO. Use error instead of perror and exit to report failure. (devio_desert_dtr): Declare BITS as `int' instead of `dev_status_t'. --- term/devio.c | 40 +++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/term/devio.c b/term/devio.c index 0271b73d..ed9df066 100644 --- a/term/devio.c +++ b/term/devio.c @@ -18,15 +18,11 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */ -#include "term.h" -#include -#include -#include -#include -#include -#include -#include +/* Avoid defenition of the baud rates from at a later time. */ +#include +/* And undefine the baud rates to avoid warnings from + . */ #undef B50 #undef B75 #undef B110 @@ -46,7 +42,22 @@ #undef B115200 #undef EXTA #undef EXTB + +#include +#include +#include +#include + +#include +#include #include +#include + +#include +#include + +#include "term.h" + /* This flag is set if there is an outstanding device_write. */ static int output_pending; @@ -94,12 +105,11 @@ static void init_devio () { mach_port_t host_priv; - errno = get_privileged_ports (&host_priv, &device_master); - if (errno) - { - perror ("Getting priviliged ports"); - exit (1); - } + error_t err; + + err = get_privileged_ports (&host_priv, &device_master); + if (err) + error (1, err, "Getting priviliged ports"); mach_port_deallocate (mach_task_self (), host_priv); phys_reply_class = ports_create_class (0, 0); } @@ -439,7 +449,7 @@ initial_open () static void devio_desert_dtr () { - dev_status_t bits; + int bits; /* Turn off DTR. */ bits = TM_HUP; -- cgit v1.2.3