summaryrefslogtreecommitdiffstats
path: root/sys/kern/tty_cons.c
Commit message (Collapse)AuthorAgeFilesLines
* Second half of the dev_t cleanup.phk2004-06-171-3/+3
| | | | | | | | | | | The big lines are: NODEV -> NULL NOUDEV -> NODEV udev_t -> dev_t udev2dev() -> findcdev() Various minor adjustments including handling of userland access to kernel space struct cdev etc.
* Do the dreaded s/dev_t/struct cdev */phk2004-06-161-9/+9
| | | | Bump __FreeBSD_version accordingly.
* Remove advertising clause from University of California Regent's license,imp2004-04-051-4/+0
| | | | | | per letter dated July 22, 1999. Approved by: core
* Device megapatch 4/6:phk2004-02-211-1/+2
| | | | | | | | Introduce d_version field in struct cdevsw, this must always be initialized to D_VERSION. Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.
* Use standard style for cdevsw initialization.phk2004-02-141-5/+5
|
* Rename cn_unavailable to cnunavailable for little more consistency.kan2004-02-051-14/+2
| | | | | | Garbage collect unused cndebug() function. Suggested by: bde
* Eliminate global cons_unavailable flag and replace it by the statuskan2004-02-051-3/+42
| | | | | bit maintained on a per-device basis. Single variable is inadequate on machines running with multiple consoles enabled.
* I think rwatson got the sign wrong here...phk2003-10-181-2/+2
|
* Wrap db_active check in #ifdef DDB, as db_active is not defined ifndefrwatson2003-10-181-0/+8
| | | | DDB.
* Add a new cn_flags fields to struct consdev, the low-level consolerwatson2003-10-181-6/+10
| | | | | | | | | | definition structure. Define one flag, CN_FLAG_NODEBUG, which indicates the console driver cannot be used in the context of the debugger. This may be used, for example, if the console device interacts with kernel services that cannot be used from the debugger context, such as the network stack. These drivers are skipped over for calls to cn_checkc() and cn_putc(), and the calling function simply moves on to the next available console.
* OK, I messed up /dev/console with what I had hoped would be compatphk2003-09-261-5/+0
| | | | code. Convert remaining console drivers and hope for the best.
* Remove wrongly sized cnd_name field, we now store the name in thephk2003-09-261-15/+21
| | | | | | | | | | | consdev structure. If the consdev name is not set and we have a cn_dev, set the name from there. Try to issue a printf about this, even though it may not have a place to go. Modify the sysctl related code to pick up the name from the consdev instead.
* Add fdidx argument to vn_open() and vn_open_cred() and pass -1 throughout.phk2003-07-271-1/+1
|
* Use a new message buffer `consmsgbuf' to forward messages to aiedowse2003-06-221-0/+70
| | | | | | | | | | | | | | | TIOCCONS console (e.g. xconsole) via a timeout routine instead of calling into the tty code directly from printf(). This fixes a number of cases where calling printf() at the wrong time (such as with locks held) would cause a panic if xconsole is running. The TIOCCONS message buffer is 8k in size by default, but this can be changed with the kern.consmsgbuf_size sysctl. By default, messages are checked for 5 times per second. The timer runs and the buffer memory remains allocated only at times when a TIOCCONS console is active. Discussed on: freebsd-arch
* Use __FBSDID().obrien2003-06-111-1/+3
|
* Don't call make_dev() before we are ready for it.phk2003-03-091-1/+9
|
* Add one little hack to allow us to make MAJOR_AUTO be zero:phk2003-03-091-12/+7
| | | | | Let the console driver ask for major 256 and magically change this to mean zero.
* Make nokqfilter() return the correct return value.phk2003-03-031-1/+1
| | | | Ditch the D_KQFILTER flag which was used to prevent calling NULL pointers.
* Gigacommit to improve device-driver source compatibility betweenphk2003-03-031-14/+10
| | | | | | | | | | | | | branches: Initialize struct cdevsw using C99 sparse initializtion and remove all initializations to default values. This patch is automatically generated and has been tested by compiling LINT with all the fields in struct cdevsw in reverse order on alpha, sparc64 and i386. Approved by: re(scottl)
* Change the console interface to pass a "struct consdev *" instead of aphk2003-02-201-4/+4
| | | | | | | | | dev_t to the method functions. The dev_t can still be found at struct consdev *->cn_dev. Add a void *cn_arg element to struct consdev which the drivers can use for retrieving their softc.
* Back out M_* changes, per decision of the TRB.imp2003-02-191-1/+1
| | | | Approved by: trb
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-1/+1
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* Remove unused variable cn_devfsdev.phk2002-12-171-2/+1
|
* Use strlcpy() instead of strncpy() to copy NUL terminated stringsrobert2002-10-171-2/+3
| | | | for safety and consistency.
* Remove new console devices with cnremove before initializing them injake2002-08-061-0/+1
| | | | | | | cninit. This allows a console driver to replace the existing console by calling cninit again, eg during the device probe. Otherwise the multiple console code sends output to both, which is unfortunate if they're using the same hardware.
* Change the suser() API to take advantage of td_ucred as well as do ajhb2002-04-011-1/+1
| | | | | | | | | | | | general cleanup of the API. The entire API now consists of two functions similar to the pre-KSE API. The suser() function takes a thread pointer as its only argument. The td_ucred member of this thread must be valid so the only valid thread pointers are curthread and a few kernel threads such as thread0. The suser_cred() function takes a pointer to a struct ucred as its first argument and an integer flag as its second argument. The flag is currently only used for the PRISON_ROOT flag. Discussed on: smp@
* Simple p_ucred -> td_ucred changes to start using the per-thread ucredjhb2002-02-271-3/+3
| | | | reference.
* Fix boot -p for DDBless kernelsguido2001-12-111-0/+6
| | | | Pointed out by: John Hay <jhay@icomtek.csir.co.za>
* Add new boot flag to i386 boot: -p.guido2001-12-101-0/+24
| | | | | | | | | | | | This flag adds a pausing utility. When ran with -p, during the kernel probing phase, the kernel will pause after each line of output. This pausing can be ended with the '.' key, and is automatically suspended when entering ddb. This flag comes in handy at systems without a serial port that either hang during booting or reser. Reviewed by: (partly by jlemon) MFC after: 1 week
* + Fix another possible vn_close race, in the same fashion as r1.95.jlemon2001-11-021-5/+6
| | | | | + Check that the cached vnode type != VBAD before calling devsw(), this can happen if the vnode has been revoked.
* cnclose() can potentially race against itself. To avoid vn_close() races,jlemon2001-10-251-2/+3
| | | | | | NULL-out cnd_vp before calling the latter, as it may block. Submitted by: dillon
* Force FWRITE on when opening the console, so that the flags passed tojlemon2001-10-251-2/+5
| | | | | vn_close match those from vn_open. This fixes the panic some people were seeing about "vrele: missed vn_close".
* Implement multiple low-level console support.jlemon2001-10-231-227/+316
|
* KSE Milestone 2julian2001-09-121-16/+16
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* With this commit, I hereby pronounce gensetdefs past its use-by date.peter2001-06-131-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the a.out emulation of 'struct linker_set' with something a little more flexible. <sys/linker_set.h> now provides macros for accessing elements and completely hides the implementation. The linker_set.h macros have been on the back burner in various forms since 1998 and has ideas and code from Mike Smith (SET_FOREACH()), John Polstra (ELF clue) and myself (cleaned up API and the conversion of the rest of the kernel to use it). The macros declare a strongly typed set. They return elements with the type that you declare the set with, rather than a generic void *. For ELF, we use the magic ld symbols (__start_<setname> and __stop_<setname>). Thanks to Richard Henderson <rth@redhat.com> for the trick about how to force ld to provide them for kld's. For a.out, we use the old linker_set struct. NOTE: the item lists are no longer null terminated. This is why the code impact is high in certain areas. The runtime linker has a new method to find the linker set boundaries depending on which backend format is in use. linker sets are still module/kld unfriendly and should never be used for anything that may be modular one day. Reviewed by: eivind
* Send the remains (such as I have located) of "block major numbers" tophk2001-03-261-1/+0
| | | | the bit-bucket.
* Extend kqueue down to the device layer.jlemon2001-02-151-2/+18
| | | | Backwards compatible approach suggested by: peter
* Replace logwakeup() with "int msgbuftrigger". There is littlephk2000-12-201-0/+1
| | | | | | | | | | | point in calling a function just to set a flag. Keep better track of the syslog FAC/PRI code and try to DTRT if they mingle. Log all writes to /dev/console to syslog with <console.info> priority. The formatting is not preserved, there is no robust, way of doing it. (Ideas with patches welcome).
* only include sys/proc.h oncemjacob2000-12-121-1/+0
|
* Include sys/proc.h so this compiles [on the Alpha].obrien2000-12-121-0/+1
|
* We reference curproc, ergo need <sys/proc.h>mjacob2000-12-121-0/+1
|
* Move suser() and suser_xxx() prototypes and a related #define fromphk2000-10-291-1/+0
| | | | | | | | | <sys/proc.h> to <sys/systm.h>. Correctly document the #includes needed in the manpage. Add one now needed #include of <sys/systm.h>. Remove the consequent 48 unused #includes of <sys/proc.h>.
* Previous commit changing SYSCTL_HANDLER_ARGS violated KNF.phk2000-07-041-1/+1
| | | | Pointed out by: bde
* Style police catches up with rev 1.26 of src/sys/sys/sysctl.h:phk2000-07-031-1/+1
| | | | | | | | Sanitize SYSCTL_HANDLER_ARGS so that simplistic tools can grog our sources: -sysctl_vm_zone SYSCTL_HANDLER_ARGS +sysctl_vm_zone (SYSCTL_HANDLER_ARGS)
* Don't follow null pointers if we somehow have a null devswitch entrybde2000-01-251-11/+17
| | | | | | | despite having a non-null cn_tab entry. This case now works the same as if there is no physical console, except i/o at the kernel printf level may still work. This frees drivers of physical console drivers from the responsibility of attaching the device no matter what.
* Fixed some style bugs (mainly ones associated with the bogus namebde2000-01-241-8/+6
| | | | condev_t for a non-typedef).
* Add a new mechanism, cndbctl(), to tell the console driver thatyokota2000-01-111-1/+17
| | | | | | | | | | | | | | | | | | | | | ddb is entered. Don't refer to `in_Debugger' to see if we are in the debugger. (The variable used to be static in Debugger() and wasn't updated if ddb is entered via traps and panic anyway.) - Don't refer to `in_Debugger'. - Add `db_active' to i386/i386/db_interface.d (as in alpha/alpha/db_interface.c). - Remove cnpollc() stub from ddb/db_input.c. - Add the dbctl function to syscons, pcvt, and sio. (The function for pcvt and sio is noop at the moment.) Jointly developed by: bde and me (The final version was tweaked by me and not reviewed by bde. Thus, if there is any error in this commit, that is entirely of mine, not his.) Some changes were obtained from: NetBSD
* Remove cdevsw_add() - the necessary make_dev() is already there.peter1999-11-181-1/+0
|
* Remove five now unused fields from struct cdevsw. They should neverphk1999-09-251-5/+0
| | | | | | | | have been there in the first place. A GENERIC kernel shrinks almost 1k. Add a slightly different safetybelt under nostop for tty drivers. Add some missing FreeBSD tags
* This patch clears the way for removing a number of tty relatedphk1999-09-251-3/+3
| | | | | | | | | | | | | | | | | | | | | fields in struct cdevsw: d_stop moved to struct tty. d_reset already unused. d_devtotty linkage now provided by dev_t->si_tty. These fields will be removed from struct cdevsw together with d_params and d_maxio Real Soon Now. The changes in this patch consist of: initialize dev->si_tty in *_open() initialize tty->t_stop remove devtotty functions rename ttpoll to ttypoll a few adjustments to these changes in the generic code a bump of __FreeBSD_version add a couple of FreeBSD tags
OpenPOWER on IntegriCloud