summaryrefslogtreecommitdiffstats
path: root/sys/kern/tty_cons.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Partially fix `sysctl machdep.console_device'. The fix will be completebde1995-06-261-2/+9
| | | | | | | | | | | | | when syscons stops mapping the console to minor MAXCONS. There is usually no corresponding device in /dev, and the correct device has minor 0. cons.c: Initialize cn_tty properly, so that CPU_CONSDEV can work. Comment about too many variants of the console tty pointer. machdep.c: Return device NODEV and not error EFAULT when there is no console device.
* Output \n as \r\n, not as \n\r.bde1995-06-141-2/+2
|
* Remove trailing whitespace.rgrimes1995-05-301-5/+5
|
* Undo the move of `#include "sc.h"' etc. to cons.h. It broke anythingbde1995-04-241-1/+4
| | | | that includes <machine/cons.h>.
* Declare the console switch functions completely.bde1995-04-231-14/+2
| | | | | Move declarations of console functions to cons.h (they should be config(8)ed).
* Implement a simple hook (or hack?) to allow graphics device consolejoerg1995-04-081-1/+5
| | | | | | | | | | | | | drivers to protect DDB from being invoked while the console is in process-controlled (i.e., graphics) mode. Implement the logic to use this hook from within pcvt. (I'm sure Søren will do the syscons part RSN). I've still got one occasion where the system stalled, but my attempts to trigger the situation artificially resulted int the expected behaviour. It's hard to track bugs without the console and DDB available. :-/
* Attempt to fix the `you can log into console only once' problem (PRjoerg1995-04-021-2/+13
| | | | | | | | #179). The fix implements a ttyhalfclose() (sort of), resetting the session and pgrp pointers when the physical device is about to be closed. Suggested by: bde
* Eliminate my private type `bool_t'.bde1995-02-261-6/+3
|
* (a) remove the pointer to each driver's tty structure array from cdevswpst1995-02-251-2/+5
| | | | | | | | | (b) add a function callback vector to tty drivers that will return a pointer to a valid tty structure based upon a dev_t (c) make syscons structures the same size whether or not APM is enabled so utilities don't crash if NAPM changes (and make the damn kernel compile!) (d) rewrite /dev/snp ioctl interface so that it is device driver and i386 independant
* Kill redundant declarations of d_open_t and d_close_t.dg1995-01-231-3/+1
|
* Keep track of open devices better to avoid closing the console device whenbde1995-01-211-26/+50
| | | | | | | the physical device is closed. Previously only the reverse case was handled. Abuse the cdevsw interface instead of the vfs interface to do this. Remove unnecessary #includes.
* Ooops, i forgot one NVT > 0 in a previous commit. Now pcvt will alsojoerg1994-12-181-2/+2
| | | | work as the system's console.
* Move the code providing the equivalent of ICRNL for console input fromjoerg1994-12-181-2/+5
| | | | the device driver(s) to cons.c.
* Added hooks for an easy drop-in of the pcvt concole driver.joerg1994-10-311-2/+3
| | | | | Don't panic:-), this is simple stuff just doing exactly the same as for syscons. (files.i386 did already contain the necessary stuff.)
* Peter Dufaults comconsole changes.phk1994-10-201-5/+13
| | | | Submitted by: Peter Dufault
* Conditionalized support for syscons as the console so that it can bedg1994-08-311-1/+6
| | | | | | made optional in the kernel config file. Submitted by: John Hay
* Cleaned up after Bruce: there were still some things that includeddg1994-08-301-9/+1
| | | | | | com.h/lpa.h. Removed all vestiges of com/lpa out of conf.c and also fixed up the end of cdevsw/bdevsw to have "no" routines instead of a NULL pointer (suggested by someone a few weeks back).
* Change all #includes to follow the current Berkeley style. Some of thesewollman1994-08-131-13/+13
| | | | | | | | | | | | | | | | | | | | | ``changes'' are actually not changes at all, but CVS sometimes has trouble telling the difference. This also includes support for second-directory compiles. This is not quite complete yet, as `config' doesn't yet do the right thing. You can still make it work trivially, however, by doing the following: rm /sys/compile mkdir /usr/obj/sys/compile ln -s M-. /sys/compile cd /sys/i386/conf config MYKERNEL cd ../../compile/MYKERNEL ln -s /sys @ rm machine ln -s @/i386/include machine make depend make
* The big 4.4BSD Lite to FreeBSD 2.0.0 (Development) patch.rgrimes1994-05-251-3/+3
| | | | | Reviewed by: Rodney W. Grimes Submitted by: John Dyson and David Greenman
* Remove confusing and incorrect comment inherited from patchkit days.dg1994-01-261-2/+2
|
* Much better fix for the hanging console problem. This one actuallydg1994-01-231-1/+14
| | | | works.
* Backed out previous commit as it requires additional kludges to workdg1994-01-231-4/+1
| | | | | completely, and it looks like syscons might solve the problem a different way (although what about serial consoles??).
* Brute-force fix for the "hanging console" problem. Simply _don't_ calldg1994-01-221-1/+4
| | | | | | | | the device close routine. This works because the device close calls the line discipline close (which only flushes the output buffers) and the ttyclose() routine, which does little of nothing except screw with the session and process group fields (which is what was causing all the problems).
* 1) Added proc file system from Paul Kranenburg with changes fromdg1993-12-121-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | John Dyson to make it reliably work under FreeBSD. 2) Added and enabled PROCFS in the GENERICxx and LINT kernels. 3) New execve() from me. Still work to be done here, but this version works well and is needed before other changes can be made. For a description of the design behind this, see freebsd-arch or ask me. 4) Rewrote stack fault code; made user stack VM grow as needed rather than all up front; improves performance a little and reduces process memory requirements. 5) Incorporated fix from Gene Stark to fault/wire a user page table page to fix a problem in copyout. This is a temporary fix and is not appropriate for pageable page tables. For a description of the problem, see Gene's post to the freebsd-hackers mailing list. 6) Tighten up vm_page struct to reduce memory requirements for it. ifdef pager page lock code as it's not being used currently. 7) Introduced new element to vmspace struct - vm_minsaddr; initial (minimum) stack address. Compliment to vm_maxsaddr. 8) Added a panic if the allocation for process u-pages fails. 9) Improve performance and accuracy of kernel profiling by putting in a little inline assembly instead of spl(). 10) Made serial console with sio driver work. Still has problems with serial input, but is almost useable. 11) Added -Bstatic to SYSTEM_LD in Makefile.i386 so that kernels will build properly with the new ld.
* Make the LINT kernel compile with -W -Wreturn-type -Wcomment -Werror, andwollman1993-11-251-1/+14
| | | | add same (sans -Werror) to Makefile for future compilations.
* Made all header files idempotent and moved incorrect common data fromwollman1993-11-071-6/+9
| | | | | headers into a related source file. (This is the only change to locore.s). Also fixed pg() to be properly declared and use stdargs.
* Yank out Christoph Robitschko's hack for the hanging console problem asdg1993-10-181-25/+2
| | | | | it didn't actually fix it, and because starting the getty on /dev/console instead of /dev/vga is a good work-around.
* Removed all patch kit headers, sccsid and rcsid strings, put $Id$ in, somergrimes1993-10-161-9/+2
| | | | minor cleanup. Added $Id$ to files that did not have any version info, etc
* patch 1of2 to prevent kill -1 syslogd from hanging the consolealm1993-08-201-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | blindly applied patch provided by Christoph Robitschko: *** cons.c.orig Sat Jun 12 07:57:53 1993 --- cons.c Thu Aug 19 22:34:53 1993 *************** *** 56,61 **** --- 56,62 ---- #include "sys/tty.h" #include "sys/file.h" #include "sys/conf.h" + #include "sys/vnode.h" #include "cons.h" *************** *** 105,118 **** --- 106,130 ---- (*cp->cn_init)(cp); } + static struct vnode *cnopenvp = NULLVP; + + cnopen(dev, flag, mode, p) dev_t dev; int flag, mode; struct proc *p; { + int error; + + if (cn_tab == NULL) return (0); dev = cn_tab->cn_dev; + if (cnopenvp == NULLVP) + if ((error = getdevvp(dev, &cnopenvp, VCHR))) { + printf("cnopen: getdevvp returned %d !\n", error); + return(error); + } return ((*cdevsw[major(dev)].d_open)(dev, flag, mode, p)); } *************** *** 121,130 **** int flag, mode; struct proc *p; { if (cn_tab == NULL) return (0); dev = cn_tab->cn_dev; ! return ((*cdevsw[major(dev)].d_close)(dev, flag, mode, p)); } cnread(dev, uio, flag) --- 133,153 ---- int flag, mode; struct proc *p; { + int error; + + if (cn_tab == NULL) return (0); dev = cn_tab->cn_dev; ! if (vcount(cnopenvp) <= 1) ! error = (*cdevsw[major(dev)].d_close)(dev, flag, mode, p); ! else ! error = 0; ! if (error == 0) { ! vrele(cnopenvp); ! cnopenvp = NULLVP; ! return(error); ! } } cnread(dev, uio, flag)
* Initial import, 0.1 + pk 0.2.4-B1rgrimes1993-06-121-0/+213
OpenPOWER on IntegriCloud