summaryrefslogtreecommitdiffstats
path: root/sys/i386/ibcs2/ibcs2_ioctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/i386/ibcs2/ibcs2_ioctl.c')
-rw-r--r--sys/i386/ibcs2/ibcs2_ioctl.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/sys/i386/ibcs2/ibcs2_ioctl.c b/sys/i386/ibcs2/ibcs2_ioctl.c
index bbaab39..0275c98 100644
--- a/sys/i386/ibcs2/ibcs2_ioctl.c
+++ b/sys/i386/ibcs2/ibcs2_ioctl.c
@@ -88,6 +88,11 @@ ibcs2_stty(struct thread *td, struct ibcs2_stty_args *args)
* iBCS2 ioctl calls.
*/
+struct speedtab {
+ int sp_speed; /* Speed. */
+ int sp_code; /* Code. */
+};
+
static struct speedtab sptab[] = {
{ 0, 0 },
{ 50, 1 },
@@ -128,6 +133,16 @@ static u_long s2btab[] = {
38400,
};
+static int
+ttspeedtab(int speed, struct speedtab *table)
+{
+
+ for ( ; table->sp_speed != -1; table++)
+ if (table->sp_speed == speed)
+ return (table->sp_code);
+ return (-1);
+}
+
static void
stios2btios(st, bt)
struct ibcs2_termios *st;
@@ -154,7 +169,7 @@ stios2btios(st, bt)
l = st->c_oflag; r = 0;
if (l & IBCS2_OPOST) r |= OPOST;
if (l & IBCS2_ONLCR) r |= ONLCR;
- if (l & IBCS2_TAB3) r |= OXTABS;
+ if (l & IBCS2_TAB3) r |= TAB3;
bt->c_oflag = r;
l = st->c_cflag; r = 0;
@@ -248,7 +263,7 @@ btios2stios(bt, st)
l = bt->c_oflag; r = 0;
if (l & OPOST) r |= IBCS2_OPOST;
if (l & ONLCR) r |= IBCS2_ONLCR;
- if (l & OXTABS) r |= IBCS2_TAB3;
+ if (l & TAB3) r |= IBCS2_TAB3;
st->c_oflag = r;
l = bt->c_cflag; r = 0;
OpenPOWER on IntegriCloud