summaryrefslogtreecommitdiffstats
path: root/sys/dev/digi
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-10-18 21:51:27 +0000
committerphk <phk@FreeBSD.org>2004-10-18 21:51:27 +0000
commitdafa1caf810829ca3d6fb150d0dae93477b45a80 (patch)
tree20f824d4840c6e3d41b20debf19f65f472d3916d /sys/dev/digi
parent6a50a160dbf47ef3773399dff0b9e84d05c0036b (diff)
downloadFreeBSD-src-dafa1caf810829ca3d6fb150d0dae93477b45a80.zip
FreeBSD-src-dafa1caf810829ca3d6fb150d0dae93477b45a80.tar.gz
Add new function ttyinitmode() which sets our systemwide default
modes on a tty structure. Both the ".init" and the current settings are initialized allowing the function to be used both at attach and open time. The function takes an argument to decide if echoing should be enabled. Echoing should not be enabled for regular physical serial ports unless they are consoles, in which case they should be configured by ttyconsolemode() instead. Use the new function throughout.
Diffstat (limited to 'sys/dev/digi')
-rw-r--r--sys/dev/digi/digi.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/sys/dev/digi/digi.c b/sys/dev/digi/digi.c
index 31e08c9..5ecc601 100644
--- a/sys/dev/digi/digi.c
+++ b/sys/dev/digi/digi.c
@@ -85,9 +85,6 @@ static void digi_free_state(struct digi_softc *);
fepcmd(port, cmd, (op2 << 8) | op1, ncmds)
#define fepcmd_w fepcmd
-
-static speed_t digidefaultrate = TTYDEF_SPEED;
-
struct con_bios {
struct con_bios *next;
u_char *bios;
@@ -589,19 +586,7 @@ digi_init(struct digi_softc *sc)
bc->edelay = 100;
- /*
- * We don't use all the flags from <sys/ttydefaults.h> since
- * they are only relevant for logins. It's important to have
- * echo off initially so that the line doesn't start blathering
- * before the echo flag can be turned off.
- */
- tp->t_init_in.c_iflag = 0;
- tp->t_init_in.c_oflag = 0;
- tp->t_init_in.c_cflag = TTYDEF_CFLAG;
- tp->t_init_in.c_lflag = 0;
- termioschars(&tp->t_init_in);
- tp->t_init_in.c_ispeed = tp->t_init_in.c_ospeed = digidefaultrate;
- tp->t_init_out = tp->t_init_in;
+ ttyinitmode(tp, 0, 0);
port->send_ring = 1; /* Default action on signal RI */
ttycreate(tp, NULL, 0, MINOR_CALLOUT, "D%r%r", sc->res.unit, i);
}
OpenPOWER on IntegriCloud