summaryrefslogtreecommitdiffstats
path: root/sys/kern/tty_compat.c
Commit message (Collapse)AuthorAgeFilesLines
* Make TIOCSTI work again.ed2010-01-041-4/+6
| | | | | | | | It looks like I didn't implement this when I imported MPSAFE TTY. Applications like mail(1) still use this. I think it's conceptually bad. Tested by: Pete French <petefrench ticketswitch com> MFC after: 2 weeks
* Fix an awful bug inside our COMPAT_43TTY code.ed2008-09-041-12/+14
| | | | | | | | | | | | | | | When I migrated tty_compat.c to MPSAFE TTY, I just hooked it up to the build and fixed it until it compiled and somewhat worked. It turns out this was not the smartest thing, because the old TTY layer also had a field called t_flags, which contained a set of sgtty flags. This means our current COMPAT_43TTY code overwrites the TTY flags, causing all strange problems to occur. Fix this code to use a new struct member called t_compatflags. This commit may cause kern/127054 to be fixed, but this still has to be tested/confirmed by the originator. It has to be fixed anyway. PR: kern/127054
* Integrate the new MPSAFE TTY layer to the FreeBSD operating system.ed2008-08-201-23/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The last half year I've been working on a replacement TTY layer for the FreeBSD kernel. The new TTY layer was designed to improve the following: - Improved driver model: The old TTY layer has a driver model that is not abstract enough to make it friendly to use. A good example is the output path, where the device drivers directly access the output buffers. This means that an in-kernel PPP implementation must always convert network buffers into TTY buffers. If a PPP implementation would be built on top of the new TTY layer (still needs a hooks layer, though), it would allow the PPP implementation to directly hand the data to the TTY driver. - Improved hotplugging: With the old TTY layer, it isn't entirely safe to destroy TTY's from the system. This implementation has a two-step destructing design, where the driver first abandons the TTY. After all threads have left the TTY, the TTY layer calls a routine in the driver, which can be used to free resources (unit numbers, etc). The pts(4) driver also implements this feature, which means posix_openpt() will now return PTY's that are created on the fly. - Improved performance: One of the major improvements is the per-TTY mutex, which is expected to improve scalability when compared to the old Giant locking. Another change is the unbuffered copying to userspace, which is both used on TTY device nodes and PTY masters. Upgrading should be quite straightforward. Unlike previous versions, existing kernel configuration files do not need to be changed, except when they reference device drivers that are listed in UPDATING. Obtained from: //depot/projects/mpsafetty/... Approved by: philip (ex-mentor) Discussed: on the lists, at BSDCan, at the DevSummit Sponsored by: Snow B.V., the Netherlands dcons(4) fixed by: kan
* Move the old BSD4.3 tty compatibility from (!BURN_BRIDGES && COMPAT_43)phk2006-01-101-5/+0
| | | | | | | | | | | | to COMPAT_43TTY. Add COMPAT_43TTY to NOTES and */conf/GENERIC Compile tty_compat.c only under the new option. Spit out #warning "Old BSD tty API used, please upgrade." if ioctl_compat.h gets #included from userland.
* Make ttsetcompat() staticphk2005-10-161-1/+1
|
* Put the pre FreeBSD-2.x tty compat code under BURN_BRIDGES.phk2004-06-211-0/+3
|
* New style functions, kill register keyword.phk2004-06-211-43/+28
|
* Deorbit COMPAT_SUNOS.phk2004-06-111-2/+2
| | | | | We inherited this from the sparc32 port of BSD4.4-Lite1. We have neither a sparc32 port nor a SunOS4.x compatibility desire these days.
* Compare t_brkc against (char)_POSIX_VDISABLE, not against -1.cognet2004-05-071-1/+1
| | | | Discussed with: bde
* Remove advertising clause from University of California Regent's license,imp2004-04-051-4/+0
| | | | | | per letter dated July 22, 1999. Approved by: core
* Use __FBSDID().obrien2003-06-111-1/+3
|
* Fixed some style bugs in the removal of __P(()). The main ones werebde2002-03-241-4/+4
| | | | | | not removing tabs before "__P((", and not outdenting continuation lines to preserve non-KNF lining up of code with parentheses. Switch to KNF formatting and/or rewrap the whole prototype in some cases.
* Remove __P.alfred2002-03-191-4/+4
|
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* This commit fixes various 64bit portability problems required fordfr1998-06-071-3/+3
| | | | | | | | | | FreeBSD/alpha. The most significant item is to change the command argument to ioctl functions from int to u_long. This change brings us inline with various other BSD versions. Driver writers may like to use (__FreeBSD_version == 300003) to detect this change. The prototype FreeBSD/alpha machdep will follow in a couple of days time.
* Don't depend on "implicit int".bde1998-02-251-4/+4
|
* Fix a couple of operator precedence bugs.steve1998-01-251-3/+3
| | | | | PR: 5450 Submitted by: Sakari Jalovaara <sja@tekla.fi>
* Make COMPAT_43 and COMPAT_SUNOS new-style options.eivind1997-12-161-1/+3
|
* Use ENOIOCTL instead of -1 (= ERESTART) for tty ioctls that arebde1997-12-061-2/+2
| | | | | not handled at a particular level. This fixes mainly restarting of interrupted TIOCDRAINs and TIOCSETA{W,F}s.
* Removed unused #includes.bde1997-08-021-6/+1
|
* Don't include <sys/ioctl.h> in the kernel. Stage 5: includebde1997-03-241-2/+2
| | | | | | <sys/ioctl_compat.h> and sometimes <sys/filio.h> instead of <sys/ioctl.h> in tty-related files. <sys/ttycom.h> is still usually imported bogusly via <sys/termios.h>.
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-221-1/+1
| | | | ready for it yet.
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* A Major staticize sweep. Generates a couple of warnings that I'll dealphk1995-12-141-2/+4
| | | | | | with later. A number of unused vars removed. A number of unused procs removed or #ifdefed.
* Improved formatting.bde1995-11-181-5/+8
| | | | | | Added a comment about possibly better handling of INPCK. Added a prototype.
* Preserve current termios speed for TIOCSET*, if it matched withache1995-08-021-3/+7
| | | | | nearest valid. It means that gtty+stty transaction (without speed change) not breaks non-standard speeds now.
* Better approximation for TIOCGETP (gtty) for non-standard speeds.ache1995-08-021-9/+18
| | | | | | Old variant returns 38400 for them, now it returns nearest matched rounded down, expect speeds in range 0 > speed < 50 rounded up to not produce hangup.
* Check for valid speed values in pty driveache1995-08-021-4/+7
| | | | | | Check for negative speed values in tty drive Back out valid speed values checking from tty drive Suggested by: bde
* Check for valid speeds in TIOCSET* and return EINVAL for incorrectache1995-08-011-7/+4
| | | | values instead of setting garbadge.
* Remove trailing whitespace.rgrimes1995-05-301-9/+9
|
* Extract "set" family functions to separate module, needed forache1995-04-111-70/+90
| | | | locking in sio f.e.
* Back out changes related to locked bits until more elegant solution will beache1995-04-021-20/+20
| | | | found. Fix flags declarations.
* Fix error in TIOCSETC/TIOCSLTC, they need to call TIOCSETA.ache1995-04-021-16/+18
| | | | Remove static from some functions, needed in sio (later)
* Return EINVAL instead of setting wrong in/out speedache1995-04-021-9/+9
| | | | | Fix declaration of cc arrays Remove static from compatspcodes, will needed in sio (later)
* c_iflag handling in setting compat modes now more close to V7ache1995-03-291-2/+4
|
* Better IXANY/IXOFF processing into setflags.ache1994-10-111-6/+14
| | | | Cosmetique 'tab' fix
* Fix old cs8->cs7 bug, bringed by rlogin.ache1994-10-111-25/+45
| | | | Obtained from: FreeBSD 1.x
* Cosmetics: added ()'s and fixed prinf-formats to make gcc silent.phk1994-10-081-2/+2
|
* Support speeds 57600 and 115200.bde1994-08-251-12/+16
| | | | Privatize functions.
* Added $Id$dg1994-08-021-0/+1
|
* The big 4.4BSD Lite to FreeBSD 2.0.0 (Development) patch.rgrimes1994-05-251-0/+7
| | | | | Reviewed by: Rodney W. Grimes Submitted by: John Dyson and David Greenman
* BSD 4.4 Lite Kernel Sourcesrgrimes1994-05-241-0/+411
OpenPOWER on IntegriCloud