summaryrefslogtreecommitdiffstats
path: root/sys/kern/tty_snoop.c
Commit message (Collapse)AuthorAgeFilesLines
* Unstaticize this driver. You can have as many snoop devices as you cangreen2000-04-021-65/+61
| | | | | | mknod :) Clean things up a lot while I'm here. A lot of KNF changes.
* Remove cdevsw_add() - the make_dev() calls are already there.peter1999-11-181-8/+1
| | | | | Don't '#if NSNP > 0' around the thing as it's silly and not required. config(8) only causes it to be compiled if NSNP is > 0 by definition.
* 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
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Convert DEVFS hooks in (most) drivers to make_dev().phk1999-08-231-24/+5
| | | | | | | | | | | | | | | | Diskslice/label code not yet handled. Vinum, i4b, alpha, pc98 not dealt with (left to respective Maintainers) Add the correct hook for devfs to kern_conf.c The net result of this excercise is that a lot less files depends on DEVFS, and devtoname() gets more sensible output in many cases. A few drivers had minor additional cleanups performed relating to cdevsw registration. A few drivers don't register a cdevsw{} anymore, but only use make_dev().
* Add Id stringsgpalmer1999-06-171-0/+2
|
* Fixed a missing userland dev_t to kernel dev_t conversion.bde1999-06-171-1/+1
|
* Simplify cdevsw registration.phk1999-05-311-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | The cdevsw_add() function now finds the major number(s) in the struct cdevsw passed to it. cdevsw_add_generic() is no longer needed, cdevsw_add() does the same thing. cdevsw_add() will print an message if the d_maj field looks bogus. Remove nblkdev and nchrdev variables. Most places they were used bogusly. Instead check a dev_t for validity by seeing if devsw() or bdevsw() returns NULL. Move bdevsw() and devsw() functions to kern/kern_conf.c Bump __FreeBSD_version to 400006 This commit removes: 72 bogus makedev() calls 26 bogus SYSINIT functions if_xe.c bogusly accessed cdevsw[], author/maintainer please fix. I4b and vinum not changed. Patches emailed to authors. LINT probably broken until they catch up.
* This commit should be a extensive NO-OP:phk1999-05-301-4/+21
| | | | | | | | | | | | | Reformat and initialize correctly all "struct cdevsw". Initialize the d_maj and d_bmaj fields. The d_reset field was not removed, although it is never used. I used a program to do most of this, so all the files now use the same consistent format. Please keep it that way. Vinum and i4b not modified, patches emailed to respective authors.
* Use NODEV instead of -1phk1999-05-101-4/+4
|
* I got tired of seeing all the cdevsw[major(foo)] all over the place.phk1999-05-081-1/+1
| | | | | | | | Made a new (inline) function devsw(dev_t dev) and substituted it. Changed to the BDEV variant to this format as well: bdevsw(dev_t dev) DEVFS will eventually benefit from this change too.
* Add sufficient braces to keep egcs happy about potentially ambiguouspeter1999-05-061-2/+2
| | | | if/else nesting.
* Suser() simplification:phk1999-04-271-1/+1
| | | | | | | | | | | | | | | | | | | 1: s/suser/suser_xxx/ 2: Add new function: suser(struct proc *), prototyped in <sys/proc.h>. 3: s/suser_xxx(\([a-zA-Z0-9_]*\)->p_ucred, \&\1->p_acflag)/suser(\1)/ The remaining suser_xxx() calls will be scrutinized and dealt with later. There may be some unneeded #include <sys/cred.h>, but they are left as an exercise for Bruce. More changes to the suser() API will come along with the "jail" code.
* Fix warnings in preparation for adding -Wall -Wcast-qual to thedillon1999-01-271-2/+2
| | | | kernel compile
* KNFize, by bde.eivind1999-01-101-3/+2
|
* Split DIAGNOSTIC -> DIAGNOSTIC, INVARIANTS, and INVARIANT_SUPPORT aseivind1999-01-081-7/+4
| | | | | | | | | discussed on -hackers. Introduce 'KASSERT(assertion, ("panic message", args))' for simple check + panic. Reviewed by: msmith
* This commit fixes various 64bit portability problems required fordfr1998-06-071-1/+1
| | | | | | | | | | 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" or bloat the data section in thebde1998-02-201-1/+1
| | | | declaration of xxx_devsw_installed.
* Back out DIAGNOSTIC changes.eivind1998-02-061-1/+0
|
* Turn DIAGNOSTIC into a new-style option.eivind1998-02-041-0/+1
|
* Make all file-system (MFS, FFS, NFS, LFS, DEVFS) related option new-style.eivind1998-01-241-0/+1
| | | | | | | | This introduce an xxxFS_BOOT for each of the rootable filesystems. (Presently not required, but encouraged to allow a smooth move of option *FS to opt_dontuse.h later.) LFS is temporarily disabled, and will be re-enabled tomorrow.
* Make COMPAT_43 and COMPAT_SUNOS new-style options.eivind1997-12-161-0/+2
|
* Removed unused #includes. Ifdefed a conditionally used #include.bde1997-11-181-14/+7
| | | | | | | | Fixed nonblocking mode. It was per-device instead of per-file. Don't depend on gcc's misfeature of rewriting char args in old-style function definitions to match wrong prototypes. Break K&R1 support to fix this quickly.
* Last major round (Unless Bruce thinks of somthing :-) of malloc changes.phk1997-10-121-1/+1
| | | | | | | | Distribute all but the most fundamental malloc types. This time I also remembered the trick to making things static: Put "static" in front of them. A couple of finer points by: bde
* Fixed gratuitous ANSIisms.bde1997-09-161-1/+3
|
* Convert select handler to poll stylepeter1997-09-141-14/+13
|
* Don't include <sys/ioctl.h> in the kernel. Stage 3: includebde1997-03-241-1/+1
| | | | <sys/filio.h> instead of <sys/ioctl.h> in non-network non-tty files.
* Don't #include <sys/fcntl.h> in <sys/file.h> if KERNEL is defined.bde1997-03-231-1/+1
| | | | | Fixed everything that depended on getting fcntl.h stuff from the wrong place. Most things don't depend on file.h stuff at all.
* Fixed null pointer panic in devtotty(). Fixed bounds checking inbde1997-03-161-7/+13
| | | | | | | devtotty(). devtotty() must check its arg carefully since the arg is supplied as ioctl data. This should fix PR3004. Renamed devtotty() to snpdevtotty().
* Switched from using devfs_add_devsw() to devfs_add_devswf()scrappy1996-03-281-4/+6
| | | | Reviewed by: julian@freebsd.org
* A Major staticize sweep. Generates a couple of warnings that I'll dealphk1995-12-141-3/+2
| | | | | | with later. A number of unused vars removed. A number of unused procs removed or #ifdefed.
* devsw tables are now arrays of POINTERS to struct [cb]devswjulian1995-12-131-1/+1
| | | | | | | | | seems to work hre just fine though I can't check every file that changed due to limmited h/w, however I've checked enught to be petty happy withe hte code.. WARNING... struct lkm[mumble] has changed so it might be an idea to recompile any lkm related programs
* Julian forgot to make the *devsw structures static.phk1995-12-081-1/+1
|
* Pass 3 of the great devsw changesjulian1995-12-081-27/+33
| | | | | | | | | | | | | | | | | | | | | | | most devsw referenced functions are now static, as they are in the same file as their devsw structure. I've also added DEVFS support for nearly every device in the system, however many of the devices have 'incorrect' names under DEVFS because I couldn't quickly work out the correct naming conventions. (but devfs won't be coming on line for a month or so anyhow so that doesn't matter) If you "OWN" a device which would normally have an entry in /dev then search for the devfs_add_devsw() entries and munge to make them right.. check out similar devices to see what I might have done in them in you can't see what's going on.. for a laugh compare conf.c conf.h defore and after... :) I have not doen DEVFS entries for any DISKSLICE devices yet as that will be a much more complicated job.. (pass 5 :) pass 4 will be to make the devsw tables of type (cdevsw * ) rather than (cdevsw) seems to work here.. complaints to the usual places.. :)
* Completed function declarations and/or added prototypes.bde1995-12-021-0/+2
|
* If you're going to mechanically replicate something in 50 filesjulian1995-11-291-1/+1
| | | | it's best to not have a (compiles cleanly) typo in it! (sigh)
* OK, that's it..julian1995-11-291-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | That's EVERY SINGLE driver that has an entry in conf.c.. my next trick will be to define cdevsw[] and bdevsw[] as empty arrays and remove all those DAMNED defines as well.. Each of these drivers has a SYSINIT linker set entry that comes in very early.. and asks teh driver to add it's own entry to the two devsw[] tables. some slight reworking of the commits from yesterday (added the SYSINIT stuff and some usually wrong but token DEVFS entries to all these devices. BTW does anyone know where the 'ata' entries in conf.c actually reside? seems we don't actually have a 'ataopen() etc... If you want to add a new device in conf.c please make sure I know so I can keep it up to date too.. as before, this is all dependent on #if defined(JREMOD) (and #ifdef DEVFS in parts)
* Second batch of cleanup changes.phk1995-10-291-2/+1
| | | | | This time mostly making a lot of things static and some unused variables here and there.
* Fix benign type mismatches in devsw functions. 82 out of 299 devswbde1995-09-081-4/+7
| | | | functions were wrong.
* Remove trailing whitespace.rgrimes1995-05-301-7/+7
|
* sameugen1995-02-271-8/+73
|
* (a) remove the pointer to each driver's tty structure array from cdevswpst1995-02-251-118/+50
| | | | | | | | | (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
* More changes to support user calls.ugen1995-02-151-13/+31
| | | | | It's 22:00 here,utility still to come(hopefully tomorrow morning..)
* Fix couple of nasty bugs..ugen1995-02-151-216/+224
| | | | | | | | | | - Overflow now calculated right - Close works ok,does not looses tty - Better overflow handling now the snooping stops on overflow,but programm notified and can reconnect if it want to..Default maximal buffer set to 664 K and this is probably too much..:))) Utility still to come
* Here it came-the all-brand-new snoop device..ugen1995-02-141-0/+469
Users-beware.. It is tested and working for me but probably have some bugs i didn't noticed so test it and reply... It can: look at what's sent to the user from tty device snoop on pty's,vty's and serial tty's It (still) can't: write to tty see what user types in local echo mode It is probably bad styled and very dependant on tty_pty.c,sio.c and syscons.c I would be really happy if another ppl would make their changes because i am not sure this is the best snoop we can have..but it is good..:)))))
OpenPOWER on IntegriCloud