rp.c (130841) | rp.c (130892) |
---|---|
1/* 2 * Copyright (c) Comtrol Corporation <support@comtrol.com> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted prodived that the follwoing conditions 7 * are met. 8 * 1. Redistributions of source code must retain the above copyright --- 18 unchanged lines hidden (view full) --- 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * 32 */ 33 34#include <sys/cdefs.h> | 1/* 2 * Copyright (c) Comtrol Corporation <support@comtrol.com> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted prodived that the follwoing conditions 7 * are met. 8 * 1. Redistributions of source code must retain the above copyright --- 18 unchanged lines hidden (view full) --- 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * 32 */ 33 34#include <sys/cdefs.h> |
35__FBSDID("$FreeBSD: head/sys/dev/rp/rp.c 130841 2004-06-21 13:02:25Z gallatin $"); | 35__FBSDID("$FreeBSD: head/sys/dev/rp/rp.c 130892 2004-06-21 22:57:16Z phk $"); |
36 37/* 38 * rp.c - for RocketPort FreeBSD 39 */ 40 41#include "opt_compat.h" 42 43#include <sys/param.h> --- 1192 unchanged lines hidden (view full) --- 1236 struct rp_port *rp; 1237 CHANNEL_t *cp; 1238 struct tty *tp; 1239 int unit, mynor, port, umynor; /* SG */ 1240 int oldspl; 1241 int error = 0; 1242 int arg, flags, result, ChanStatus; 1243 struct termios *t; | 36 37/* 38 * rp.c - for RocketPort FreeBSD 39 */ 40 41#include "opt_compat.h" 42 43#include <sys/param.h> --- 1192 unchanged lines hidden (view full) --- 1236 struct rp_port *rp; 1237 CHANNEL_t *cp; 1238 struct tty *tp; 1239 int unit, mynor, port, umynor; /* SG */ 1240 int oldspl; 1241 int error = 0; 1242 int arg, flags, result, ChanStatus; 1243 struct termios *t; |
1244#ifndef BURN_BRIDGES |
|
1244#if defined(COMPAT_43) 1245 u_long oldcmd; 1246 struct termios term; 1247#endif | 1245#if defined(COMPAT_43) 1246 u_long oldcmd; 1247 struct termios term; 1248#endif |
1249#endif |
|
1248 1249 umynor = (((minor(dev) >> 16) -1) * 32); /* SG */ 1250 port = (minor(dev) & 0x1f); /* SG */ 1251 mynor = (port + umynor); /* SG */ 1252 unit = minor_to_unit[mynor]; 1253 rp = rp_addr(unit) + port; 1254 1255 if(IS_CONTROL(dev)) { --- 28 unchanged lines hidden (view full) --- 1284 default: 1285 return(ENOTTY); 1286 } 1287 } 1288 1289 tp = rp->rp_tty; 1290 cp = &rp->rp_channel; 1291 | 1250 1251 umynor = (((minor(dev) >> 16) -1) * 32); /* SG */ 1252 port = (minor(dev) & 0x1f); /* SG */ 1253 mynor = (port + umynor); /* SG */ 1254 unit = minor_to_unit[mynor]; 1255 rp = rp_addr(unit) + port; 1256 1257 if(IS_CONTROL(dev)) { --- 28 unchanged lines hidden (view full) --- 1286 default: 1287 return(ENOTTY); 1288 } 1289 } 1290 1291 tp = rp->rp_tty; 1292 cp = &rp->rp_channel; 1293 |
1294#ifndef BURN_BRIDGES |
|
1292#if defined(COMPAT_43) 1293 term = tp->t_termios; 1294 oldcmd = cmd; 1295 error = ttsetcompat(tp, &cmd, data, &term); 1296 if(error != 0) 1297 return(error); 1298 if(cmd != oldcmd) { 1299 data = (caddr_t)&term; 1300 } 1301#endif | 1295#if defined(COMPAT_43) 1296 term = tp->t_termios; 1297 oldcmd = cmd; 1298 error = ttsetcompat(tp, &cmd, data, &term); 1299 if(error != 0) 1300 return(error); 1301 if(cmd != oldcmd) { 1302 data = (caddr_t)&term; 1303 } 1304#endif |
1305#endif |
|
1302 if((cmd == TIOCSETA) || (cmd == TIOCSETAW) || (cmd == TIOCSETAF)) { 1303 int cc; 1304 struct termios *dt = (struct termios *)data; 1305 struct termios *lt = IS_CALLOUT(dev) 1306 ? &rp->lt_out : &rp->lt_in; 1307 1308 dt->c_iflag = (tp->t_iflag & lt->c_iflag) 1309 | (dt->c_iflag & ~lt->c_iflag); --- 353 unchanged lines hidden --- | 1306 if((cmd == TIOCSETA) || (cmd == TIOCSETAW) || (cmd == TIOCSETAF)) { 1307 int cc; 1308 struct termios *dt = (struct termios *)data; 1309 struct termios *lt = IS_CALLOUT(dev) 1310 ? &rp->lt_out : &rp->lt_in; 1311 1312 dt->c_iflag = (tp->t_iflag & lt->c_iflag) 1313 | (dt->c_iflag & ~lt->c_iflag); --- 353 unchanged lines hidden --- |