summaryrefslogtreecommitdiffstats
path: root/sys/miscfs
Commit message (Collapse)AuthorAgeFilesLines
* A partial implementation of the procfs cmdline pseudo-file. Thispeter1999-01-054-5/+51
| | | | | | | | is enough to satisfy things like StarOffice. This is a hack, but doing it properly would be a LOT of work, and would require extensive grovelling around in the user address space to find the argv[]. Obtained from: Mostly from Andrzej Bialecki <abial@nask.pl>.
* Made this compile if UMAPFS_DIAGNOSTIC is defined. This has been brokenbde1999-01-011-2/+2
| | | | | since before rev.1.1, so UMAPFS_DIAGNOSTIC should not be trusted. UMAPFS_DIAGNOSTIC is commented out in LINT to hide various bugs.
* Fix possible NULL-pointer deref in error case (same as DEVFS).eivind1998-12-161-2/+2
|
* Avoid NULL-pointer dereference on error condition.eivind1998-12-151-2/+2
|
* Cleanup uninitialized-possibly-used (but really not) warningsdillon1998-12-143-6/+6
|
* Rename one of the two devfs_link's to devfs_makelink.eivind1998-12-101-2/+2
|
* The "easy" fixes for compiling the kernel -Wunused: remove unreferenced staticarchie1998-12-0710-38/+17
| | | | and local variables, goto labels, and functions declared but not defined.
* '\0' is the most ugly NULL pointer constant I've ever seen in real code.eivind1998-12-071-2/+2
|
* Examine all occurrences of sprintf(), strcat(), and str[n]cpy()archie1998-12-043-9/+10
| | | | | | | | | | | | | | for possible buffer overflow problems. Replaced most sprintf()'s with snprintf(); for others cases, added terminating NUL bytes where appropriate, replaced constants like "16" with sizeof(), etc. These changes include several bug fixes, but most changes are for maintainability's sake. Any instance where it wasn't "immediately obvious" that a buffer overflow could not occur was made safer. Reviewed by: Bruce Evans <bde@zeta.org.au> Reviewed by: Matthew Dillon <dillon@apollo.backplane.com> Reviewed by: Mike Spengler <mks@networkcs.com>
* Staticize.eivind1998-11-261-2/+2
|
* Return ENOTTY instead of EBADF for ioctls on dead vnodes. This fixesbde1998-11-221-2/+2
| | | | | tcsetpgrp() on controlling terminals that are no longer associated with the session of the calling process, not to mention ioctl.2.
* Finished updating module event handlers to be compatible withbde1998-11-151-2/+3
| | | | modeventhand_t.
* "fix" a warning that has been bugging me for ages. Eliminate a couplepeter1998-11-091-11/+10
| | | | | of temporary variables since they are only used once and their types were the cause of the warnings.
* Delete stray extern declaration for non-existing variables.peter1998-11-091-2/+1
|
* Change the #ifdef UNION code into a callable hook. Arrange to have thispeter1998-11-032-2/+83
| | | | set up when unionfs is present, either statically or as a kld module.
* Use TAILQ macros for clean/dirty block list processing. Set b_xflagspeter1998-10-313-10/+10
| | | | rather than abusing the list next pointer with a magic number.
* Added a second argument, "activate" to the vm_page_unwire() call so thatdg1998-10-281-2/+2
| | | | the caller can select either inactive or active queue to put the page on.
* Removed redundant bitrotted checks for major numbers instead of updatingbde1998-10-261-4/+3
| | | | them.
* Make devfs update the atime timestamp so that 'w' works when usingsos1998-09-302-5/+12
| | | | options DEVFS.
* various nits that didn't make it through the brucefilter.phk1998-09-121-5/+6
|
* Oops, don't assume that the environment is normal in devfs_mount().bde1998-09-081-4/+6
| | | | | It isn't for the hidden mountpoint. The static vfs's haven't been attached then, so mp->mnt_vfc can't be valid.
* Removed statically configured mount type numbers (MOUNT_*) and allbde1998-09-078-20/+20
| | | | | | | | | references to them. The change a couple of days ago to ignore these numbers in statically configured vfsconf structs was slightly premature because the cd9660, cfs, devfs, ext2fs, nfs vfs's still used MOUNT_* instead of the number in their vfsconf struct.
* Add a new vnode op, VOP_FREEBLKS(), which filesystems can use to informphk1998-09-051-1/+26
| | | | | | | | | | | | | device drivers about sectors no longer in use. Device-drivers receive the call through d_strategy, if they have D_CANFREE in d_flags. This allows flash based devices to erase the sectors and avoid pointlessly carrying them around in compactions. Reviewed by: Kirk Mckusick, bde Sponsored by: M-Systems (www.m-sys.com)
* Cosmetic changes to the PAGE_XXX macros to make them consistent withdfr1998-09-042-4/+4
| | | | the other objects in vm.
* sort the prototypesphk1998-08-251-12/+12
|
* Last commit managed to get mangled somehow.phk1998-08-241-2/+4
|
* Remove the last remaining evidence of B_TAPE.phk1998-08-241-13/+3
| | | | Reclaim 3 unused bits in b_flags
* Enabled Lite2 fix for reading from dead ttys.bde1998-08-232-21/+3
|
* Use [u]intptr_t instead of [u_]long for casts between pointers andbde1998-08-163-13/+13
| | | | integers. Don't forget to cast to (void *) as well.
* Fixed printf format errors.bde1998-07-305-43/+50
|
* Style fixes and a bug fix: don't remove the exit handler if unmountalex1998-07-271-5/+6
| | | | | | fails. Submitted by: bde
* A better solution to the rm_at_exit problem: Register the exit functionalex1998-07-271-23/+10
| | | | | | | | during first mount. Unregister the exit function at last unmount. Concept by: sef Reviewed by: sef Implemented by: alex
* Override the default VFS LKM dispatch functions so that a modulealex1998-07-251-4/+19
| | | | | unload function can be provided (this is necessary to unregister the at_exit handler).
* Cast pointers to [u]intptr_t instead of to [unsigned] long.bde1998-07-151-2/+2
|
* Cast pointers to uintptr_t/intptr_t instead of to u_long/long,bde1998-07-153-6/+6
| | | | | | | respectively. Most of the longs should probably have been u_longs, but this changes is just to prevent warnings about casts between pointers and integers of different sizes, not to fix poorly chosen types.
* Fixed printf format errors.bde1998-07-113-15/+19
|
* Quick fix for type mismatches which were fatal if longs aren't 32bde1998-07-071-5/+5
| | | | | | | | bits. We used a private, wrong, version of `struct dirent' to help break getdirentries(), and we use a silly check that the size of this struct is a power of 2 to help break mount() if getdirentries() would not work. This fix just changes the struct to match `struct dirent' (except for the name length).
* DEVFS completely bypasses the cdevsw and bdevsw tables now.julian1998-07-053-232/+804
| | | | | | | | Each devfs node has (and has had fro a while) a pointer directly to the correct cdefsw entry so just use it instead of doing the lookup. There are several other places in the kernel that still use the tables however, so they can't go away yet..
* There is no such thing any more as "struct bdevsw".julian1998-07-043-9/+8
| | | | | | | | | | | | | | | | | | There is only cdevsw (which should be renamed in a later edit to deventry or something). cdevsw contains the union of what were in both bdevsw an cdevsw entries. The bdevsw[] table stiff exists and is a second pointer to the cdevsw entry of the device. it's major is in d_bmaj rather than d_maj. some cleanup still to happen (e.g. dsopen now gets two pointers to the same cdevsw struct instead of one to a bdevsw and one to a cdevsw). rawread()/rawwrite() went away as part of this though it's not strictly the same patch, just that it involves all the same lines in the drivers. cdroms no longer have write() entries (they did have rawwrite (?)). tapes no longer have support for bdev operations. Reviewed by: Eivind Eklund and Mike Smith Changes suggested by eivind.
* VOP_STRATEGY grows an (struct vnode *) argumentjulian1998-07-044-9/+11
| | | | | | as the value in b_vp is often not really what you want. (and needs to be frobbed). more cleanups will follow this. Reviewed by: Bruce Evans <bde@freebsd.org>
* Remove "not hungly" panics. Cookies now used by the linux and ibcs2dt1998-06-252-20/+6
| | | | | | | emulators. The emulators assume that filesystem may just ignore cookies, and handle this case correctly. So we just ignore cookies. Also sync *_readdir "prototypes" with reality.
* Removed unused includes.bde1998-06-211-3/+1
|
* Avoid a 64-bit division in procfs_readdir(). Fixed related overflows.bde1998-06-141-10/+6
| | | | | | | | | | | | Check args using the same expression as in fdesc and kernfs. The check was actually already correct, modulo overflow. It could be tightened up to either allow huge (aligned) offsets, treating them as EOF, or disallow all offsets beyond EOF. Didn't fix invalid address calculation &foo[i] where i may be out of bounds. Didn't fix shooting of foot using a private unportable dirent struct.
* Avoid a 64-bit division in kernfs_readdir(). Fixed related overflowsbde1998-06-141-3/+8
| | | | and arg checking.
* Avoid a 64-bit division in fdesc_readdir(). Fixed related overflowsbde1998-06-141-27/+14
| | | | | | | | and missing arg checking. Panic instead of returning bogus error codes or forgetting to check all cases if fdesc_readdir() gets called for a non-directory. This can't happen.
* Make these files compile.dfr1998-06-103-5/+6
|
* ENOPNOTSUPP --> EOPNOTSUPPalex1998-06-101-2/+2
| | | | | PR: 6906 Submitted by: Steven G. Kargl <kargl@troutmask.apl.washington.edu>
* Don't silently accept attempts to change flags where they are notpeter1998-06-106-9/+29
| | | | supported.
* This commit fixes various 64bit portability problems required fordfr1998-06-073-6/+6
| | | | | | | | | | 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.
* Make flushing dirty pages work correctly on filesystems thatdyson1998-05-211-2/+3
| | | | | | unexpectedly do not complete writes even with sync I/O requests. This should help the behavior of mmaped files when using softupdates (and perhaps in other circumstances also.)
OpenPOWER on IntegriCloud