sio.c (130872) | sio.c (130892) |
---|---|
1/*- 2 * Copyright (c) 1991 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * from: @(#)com.c 7.5 (Berkeley) 5/16/91 30 * from: i386/isa sio.c,v 1.234 31 */ 32 33#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1991 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * from: @(#)com.c 7.5 (Berkeley) 5/16/91 30 * from: i386/isa sio.c,v 1.234 31 */ 32 33#include <sys/cdefs.h> |
34__FBSDID("$FreeBSD: head/sys/dev/sio/sio.c 130872 2004-06-21 20:09:23Z phk $"); | 34__FBSDID("$FreeBSD: head/sys/dev/sio/sio.c 130892 2004-06-21 22:57:16Z phk $"); |
35 36#include "opt_comconsole.h" 37#include "opt_compat.h" 38#include "opt_ddb.h" 39#include "opt_sio.h" 40 41/* 42 * Serial driver, based on 386BSD-0.1 com driver. --- 2017 unchanged lines hidden (view full) --- 2060 int flag; 2061 struct thread *td; 2062{ 2063 struct com_s *com; 2064 int error; 2065 int mynor; 2066 int s; 2067 struct tty *tp; | 35 36#include "opt_comconsole.h" 37#include "opt_compat.h" 38#include "opt_ddb.h" 39#include "opt_sio.h" 40 41/* 42 * Serial driver, based on 386BSD-0.1 com driver. --- 2017 unchanged lines hidden (view full) --- 2060 int flag; 2061 struct thread *td; 2062{ 2063 struct com_s *com; 2064 int error; 2065 int mynor; 2066 int s; 2067 struct tty *tp; |
2068#ifndef BURN_BRIDGES |
|
2068#if defined(COMPAT_43) 2069 u_long oldcmd; 2070 struct termios term; 2071#endif | 2069#if defined(COMPAT_43) 2070 u_long oldcmd; 2071 struct termios term; 2072#endif |
2073#endif |
|
2072 2073 mynor = minor(dev); 2074 com = dev->si_drv1; 2075 if (com == NULL || com->gone) 2076 return (ENODEV); 2077 tp = com->tp; | 2074 2075 mynor = minor(dev); 2076 com = dev->si_drv1; 2077 if (com == NULL || com->gone) 2078 return (ENODEV); 2079 tp = com->tp; |
2080#ifndef BURN_BRIDGES |
|
2078#if defined(COMPAT_43) 2079 term = tp->t_termios; 2080 oldcmd = cmd; 2081 error = ttsetcompat(tp, &cmd, data, &term); 2082 if (error != 0) 2083 return (error); 2084 if (cmd != oldcmd) 2085 data = (caddr_t)&term; 2086#endif | 2081#if defined(COMPAT_43) 2082 term = tp->t_termios; 2083 oldcmd = cmd; 2084 error = ttsetcompat(tp, &cmd, data, &term); 2085 if (error != 0) 2086 return (error); 2087 if (cmd != oldcmd) 2088 data = (caddr_t)&term; 2089#endif |
2090#endif |
|
2087 if (cmd == TIOCSETA || cmd == TIOCSETAW || cmd == TIOCSETAF) { 2088 int cc; 2089 struct termios *dt = (struct termios *)data; 2090 struct termios *lt = mynor & CALLOUT_MASK 2091 ? &com->lt_out : &com->lt_in; 2092 2093 dt->c_iflag = (tp->t_iflag & lt->c_iflag) 2094 | (dt->c_iflag & ~lt->c_iflag); --- 1198 unchanged lines hidden --- | 2091 if (cmd == TIOCSETA || cmd == TIOCSETAW || cmd == TIOCSETAF) { 2092 int cc; 2093 struct termios *dt = (struct termios *)data; 2094 struct termios *lt = mynor & CALLOUT_MASK 2095 ? &com->lt_out : &com->lt_in; 2096 2097 dt->c_iflag = (tp->t_iflag & lt->c_iflag) 2098 | (dt->c_iflag & ~lt->c_iflag); --- 1198 unchanged lines hidden --- |