digi.c (130640) | digi.c (130892) |
---|---|
1/*- 2 * Copyright (c) 2001 Brian Somers <brian@Awfulhak.org> 3 * based on work by Slawa Olhovchenkov 4 * John Prince <johnp@knight-trosoft.com> 5 * Eric Hernes 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 12 unchanged lines hidden (view full) --- 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * | 1/*- 2 * Copyright (c) 2001 Brian Somers <brian@Awfulhak.org> 3 * based on work by Slawa Olhovchenkov 4 * John Prince <johnp@knight-trosoft.com> 5 * Eric Hernes 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 12 unchanged lines hidden (view full) --- 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * |
29 * $FreeBSD: head/sys/dev/digi/digi.c 130640 2004-06-17 17:16:53Z phk $ | 29 * $FreeBSD: head/sys/dev/digi/digi.c 130892 2004-06-21 22:57:16Z phk $ |
30 */ 31 32/*- 33 * TODO: 34 * Figure out what the con bios stuff is supposed to do 35 * Test with *LOTS* more cards - I only have a PCI8r and an ISA Xem. 36 */ 37 --- 1029 unchanged lines hidden (view full) --- 1067 1068static int 1069digiioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) 1070{ 1071 int unit, pnum, mynor, error, s; 1072 struct digi_softc *sc; 1073 struct digi_p *port; 1074 struct tty *tp; | 30 */ 31 32/*- 33 * TODO: 34 * Figure out what the con bios stuff is supposed to do 35 * Test with *LOTS* more cards - I only have a PCI8r and an ISA Xem. 36 */ 37 --- 1029 unchanged lines hidden (view full) --- 1067 1068static int 1069digiioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) 1070{ 1071 int unit, pnum, mynor, error, s; 1072 struct digi_softc *sc; 1073 struct digi_p *port; 1074 struct tty *tp; |
1075#ifndef BURN_BRIDGES |
|
1075#if defined(COMPAT_43) 1076 int oldcmd; 1077 struct termios term; 1078#endif | 1076#if defined(COMPAT_43) 1077 int oldcmd; 1078 struct termios term; 1079#endif |
1080#endif |
|
1079 1080 mynor = minor(dev); 1081 unit = MINOR_TO_UNIT(mynor); 1082 pnum = MINOR_TO_PORT(mynor); 1083 1084 sc = (struct digi_softc *)devclass_get_softc(digi_devclass, unit); 1085 KASSERT(sc, ("digi%d: softc not allocated in digiioctl\n", unit)); 1086 --- 134 unchanged lines hidden (view full) --- 1221 port->cd = sc->csigs->cd; 1222 port->dsr = sc->csigs->dsr; 1223 } 1224 } 1225 return (0); 1226 } 1227 1228 tp = port->tp; | 1081 1082 mynor = minor(dev); 1083 unit = MINOR_TO_UNIT(mynor); 1084 pnum = MINOR_TO_PORT(mynor); 1085 1086 sc = (struct digi_softc *)devclass_get_softc(digi_devclass, unit); 1087 KASSERT(sc, ("digi%d: softc not allocated in digiioctl\n", unit)); 1088 --- 134 unchanged lines hidden (view full) --- 1223 port->cd = sc->csigs->cd; 1224 port->dsr = sc->csigs->dsr; 1225 } 1226 } 1227 return (0); 1228 } 1229 1230 tp = port->tp; |
1231#ifndef BURN_BRIDGES |
|
1229#if defined(COMPAT_43) 1230 term = tp->t_termios; 1231 oldcmd = cmd; 1232 error = ttsetcompat(tp, &cmd, data, &term); 1233 if (error != 0) 1234 return (error); 1235 if (cmd != oldcmd) 1236 data = (caddr_t) & term; 1237#endif | 1232#if defined(COMPAT_43) 1233 term = tp->t_termios; 1234 oldcmd = cmd; 1235 error = ttsetcompat(tp, &cmd, data, &term); 1236 if (error != 0) 1237 return (error); 1238 if (cmd != oldcmd) 1239 data = (caddr_t) & term; 1240#endif |
1241#endif |
|
1238 if (cmd == TIOCSETA || cmd == TIOCSETAW || cmd == TIOCSETAF) { 1239 int cc; 1240 struct termios *dt; 1241 struct termios *lt; 1242 1243 dt = (struct termios *)data; 1244 lt = (mynor & CALLOUT_MASK) ? &port->lt_out : &port->lt_in; 1245 --- 685 unchanged lines hidden --- | 1242 if (cmd == TIOCSETA || cmd == TIOCSETAW || cmd == TIOCSETAF) { 1243 int cc; 1244 struct termios *dt; 1245 struct termios *lt; 1246 1247 dt = (struct termios *)data; 1248 lt = (mynor & CALLOUT_MASK) ? &port->lt_out : &port->lt_in; 1249 --- 685 unchanged lines hidden --- |