define and export the global variable "comconscflag", the default tty

'cflag' for the console.  Normally set to TTYDEF_CFLAG, may be
overridden by machine-dependent console attachment code, as necessary.
(Alpha uses it to set cs8 -parenb.)  Files including comvar.h now
need to include <sys/termios.h>, because comconscflag is of type
tcflag_t.
This commit is contained in:
cgd 1996-04-15 18:54:31 +00:00
parent 4d54b9c567
commit b6549d493d
4 changed files with 16 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: com.c,v 1.78 1996/04/11 22:28:31 cgd Exp $ */
/* $NetBSD: com.c,v 1.79 1996/04/15 18:54:31 cgd Exp $ */
/*-
* Copyright (c) 1993, 1994, 1995, 1996
@ -160,6 +160,7 @@ int comconsinit;
int comconsattached;
bus_chipset_tag_t comconsbc;
bus_io_handle_t comconsioh;
tcflag_t comconscflag = TTYDEF_CFLAG;
int commajor;
int comsopen = 0;
@ -534,7 +535,10 @@ comopen(dev, flag, mode, p)
ttychars(tp);
tp->t_iflag = TTYDEF_IFLAG;
tp->t_oflag = TTYDEF_OFLAG;
tp->t_cflag = TTYDEF_CFLAG;
if (ISSET(sc->sc_hwflags, COM_HW_CONSOLE))
tp->t_cflag = comconscflag;
else
tp->t_cflag = TTYDEF_CFLAG;
if (ISSET(sc->sc_swflags, COM_SW_CLOCAL))
SET(tp->t_cflag, CLOCAL);
if (ISSET(sc->sc_swflags, COM_SW_CRTSCTS))

View File

@ -1,4 +1,4 @@
/* $NetBSD: comvar.h,v 1.3 1996/03/10 09:01:26 cgd Exp $ */
/* $NetBSD: comvar.h,v 1.4 1996/04/15 18:54:35 cgd Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
@ -45,3 +45,4 @@ extern int comconsaddr;
extern int comconsattached;
extern bus_chipset_tag_t comconsbc;
extern bus_io_handle_t comconsioh;
extern tcflag_t comconscflag;

View File

@ -1,4 +1,4 @@
/* $NetBSD: com.c,v 1.78 1996/04/11 22:28:31 cgd Exp $ */
/* $NetBSD: com.c,v 1.79 1996/04/15 18:54:31 cgd Exp $ */
/*-
* Copyright (c) 1993, 1994, 1995, 1996
@ -160,6 +160,7 @@ int comconsinit;
int comconsattached;
bus_chipset_tag_t comconsbc;
bus_io_handle_t comconsioh;
tcflag_t comconscflag = TTYDEF_CFLAG;
int commajor;
int comsopen = 0;
@ -534,7 +535,10 @@ comopen(dev, flag, mode, p)
ttychars(tp);
tp->t_iflag = TTYDEF_IFLAG;
tp->t_oflag = TTYDEF_OFLAG;
tp->t_cflag = TTYDEF_CFLAG;
if (ISSET(sc->sc_hwflags, COM_HW_CONSOLE))
tp->t_cflag = comconscflag;
else
tp->t_cflag = TTYDEF_CFLAG;
if (ISSET(sc->sc_swflags, COM_SW_CLOCAL))
SET(tp->t_cflag, CLOCAL);
if (ISSET(sc->sc_swflags, COM_SW_CRTSCTS))

View File

@ -1,4 +1,4 @@
/* $NetBSD: comvar.h,v 1.3 1996/03/10 09:01:26 cgd Exp $ */
/* $NetBSD: comvar.h,v 1.4 1996/04/15 18:54:35 cgd Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
@ -45,3 +45,4 @@ extern int comconsaddr;
extern int comconsattached;
extern bus_chipset_tag_t comconsbc;
extern bus_io_handle_t comconsioh;
extern tcflag_t comconscflag;