aboutsummaryrefslogtreecommitdiff
path: root/sys/miscfs/devfs/devfs_tree.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove all traces of Julians DEVFS (incl from kern/subr_diskslice.c)Poul-Henning Kamp2000-08-201-1297/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove old DEVFS support fields from dev_t. Make uid, gid & mode members of dev_t and set them in make_dev(). Use correct uid, gid & mode in make_dev in disk minilayer. Add support for registering alias names for a dev_t using the new function make_dev_alias(). These will show up as symlinks in DEVFS. Use makedev() rather than make_dev() for MFSs magic devices to prevent DEVFS from noticing this abuse. Add a field for DEVFS inode number in dev_t. Add new DEVFS in fs/devfs. Add devfs cloning to: disk minilayer (ie: ad(4), sd(4), cd(4) etc etc) md(4), tun(4), bpf(4), fd(4) If DEVFS add -d flag to /sbin/inits args to make it mount devfs. Add commented out DEVFS to GENERIC Notes: svn path=/head/; revision=64880
* s/p_cred->pc_ucred/p_ucred/gPoul-Henning Kamp1999-11-211-2/+2
| | | | Notes: svn path=/head/; revision=53503
* Fix various trivial warnings from LINTPoul-Henning Kamp1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50523
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* Simplify the handling of VCHR and VBLK vnodes using the new dev_t:Poul-Henning Kamp1999-08-261-15/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the alias list a SLIST. Drop the "fast recycling" optimization of vnodes (including the returning of a prexisting but stale vnode from checkalias). It doesn't buy us anything now that we don't hardlimit vnodes anymore. Rename checkalias2() and checkalias() to addalias() and addaliasu() - which takes dev_t and udev_t arg respectively. Make the revoke syscalls use vcount() instead of VALIASED. Remove VALIASED flag, we don't need it now and it is faster to traverse the much shorter lists than to maintain the flag. vfs_mountedon() can check the dev_t directly, all the vnodes point to the same one. Print the devicename in specfs/vprint(). Remove a couple of stale LFS vnode flags. Remove unimplemented/unused LK_DRAINED; Notes: svn path=/head/; revision=50405
* Make a place to store the devfs hook for the block device, as the sameJulian Elischer1999-08-251-3/+2
| | | | | | | specinfo is used to identify both raw and block version sof a device. Notes: svn path=/head/; revision=50376
* Make DEVFS use PHK's specinfo struct as the source of dev_t and devsw.Julian Elischer1999-08-251-19/+16
| | | | | | | | | | | In lookup() however it's the other way around as we need to supply the dev_t for the vnode, so devfs still has a copy of it stashed away. Sourcing it from the vnode in the vnops however is useful as it makes a lot of the code almost the same as that in specfs. Notes: svn path=/head/; revision=50334
* Devfs now adds itself to the hook that PHK supplies.Julian Elischer1999-08-241-1/+21
| | | | | | | | block devices are still not handled correctly, though a kludge may make them "ok". Notes: svn path=/head/; revision=50317
* Fix warnings in preparation for adding -Wall -Wcast-qual to theMatthew Dillon1999-01-271-17/+19
| | | | | | | kernel compile Notes: svn path=/head/; revision=43305
* Rename one of the two devfs_link's to devfs_makelink.Eivind Eklund1998-12-101-2/+2
| | | | Notes: svn path=/head/; revision=41658
* Staticize.Eivind Eklund1998-11-261-2/+2
| | | | Notes: svn path=/head/; revision=41362
* DEVFS completely bypasses the cdevsw and bdevsw tables now.Julian Elischer1998-07-051-3/+3
| | | | | | | | | | | 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.. Notes: svn path=/head/; revision=37407
* There is no such thing any more as "struct bdevsw".Julian Elischer1998-07-041-3/+3
| | | | | | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=37389
* Removed unused includes.Bruce Evans1998-06-211-3/+1
| | | | Notes: svn path=/head/; revision=37094
* Make the devfs SLICE option a standard type option.Julian Elischer1998-04-201-4/+8
| | | | | | | (hopefully it will go away eventually anyhow) Notes: svn path=/head/; revision=35323
* Add changes and code to implement a functional DEVFS.Julian Elischer1998-04-191-40/+120
| | | | | | | | | | | | | | | | | | | | | | | | This code will be turned on with the TWO options DEVFS and SLICE. (see LINT) Two labels PRE_DEVFS_SLICE and POST_DEVFS_SLICE will deliniate these changes. /dev will be automatically mounted by init (thanks phk) on bootup. See /sys/dev/slice/slice.4 for more info. All code should act the same without these options enabled. Mike Smith, Poul Henning Kamp, Soeren, and a few dozen others This code does not support the following: bad144 handling. Persistance. (My head is still hurting from the last time we discussed this) ATAPI flopies are not handled by the SLICE code yet. When this code is running, all major numbers are arbitrary and COULD be dynamically assigned. (this is not done, for POLA only) Minor numbers for disk slices ARE arbitray and dynamically assigned. Notes: svn path=/head/; revision=35319
* Seventy-odd "its" / "it's" typos in comments fixed as per kern/6108.Dag-Erling Smørgrav1998-04-171-4/+4
| | | | Notes: svn path=/head/; revision=35256
* Add two new functions, get{micro|nano}time.Poul-Henning Kamp1998-03-261-3/+3
| | | | | | | | | | | | | | | They are atomic, but return in essence what is in the "time" variable. gettime() is now a macro front for getmicrotime(). Various patches to use the two new functions instead of the various hacks used in their absence. Some puntuation and grammer patches from Bruce. A couple of XXX comments. Notes: svn path=/head/; revision=34901
* add copyrightsJulian Elischer1998-01-021-3/+25
| | | | Notes: svn path=/head/; revision=32176
* fix slight breakages from PHK's VFS work.Julian Elischer1997-11-081-1/+3
| | | | | | | also remove irrelevant copyright, now that all that code has gone away. Notes: svn path=/head/; revision=31042
* 1/ by default make all versions of the same device get the same vnode.Julian Elischer1997-10-161-2/+2
| | | | | | | | 2/ Show the dummy mount in the mount list. it cannot be reached (that I know of) but puting it there, means that disks mounted from devfs will have their things such as the superblock and the bitmaps, synced to disk :) Notes: svn path=/head/; revision=30464
* some cleanups of init code, and changes needed to support disk layering.Julian Elischer1997-10-161-1/+2
| | | | Notes: svn path=/head/; revision=30463
* if we free all the links to a node, then by definitionJulian Elischer1997-10-121-2/+1
| | | | | | | | | | we freed the name we used to find it.. SO DON'T free it again later! pointy hat over here please.. Notes: svn path=/head/; revision=30359
* Last major round (Unless Bruce thinks of somthing :-) of malloc changes.Poul-Henning Kamp1997-10-121-4/+4
| | | | | | | | | | | 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 Notes: svn path=/head/; revision=30354
* Distribute and statizice a lot of the malloc M_* types.Poul-Henning Kamp1997-10-111-1/+5
| | | | | | | Substantial input from: bde Notes: svn path=/head/; revision=30309
* Allow a deleted deveice to delte it's nodes in other mounted devfsJulian Elischer1997-10-101-1/+7
| | | | | | | filesystems even if not in SPLIT_DEVS mode. Notes: svn path=/head/; revision=30263
* devfs changes to allow old (better) and newer (braindamaged) behaviour.Julian Elischer1997-09-161-10/+24
| | | | | | | I'm going to try migrate back, while keeping the newer code. Notes: svn path=/head/; revision=29498
* Removed yet more vestiges of config-time swap configuration and/orBruce Evans1997-09-071-4/+2
| | | | | | | cleaned up nearby cruft. Notes: svn path=/head/; revision=29208
* Removed vestiges of config-time "argument processing" configuration.Bruce Evans1997-09-071-2/+2
| | | | Notes: svn path=/head/; revision=29203
* two fixes submitted by Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru>Julian Elischer1997-08-261-3/+4
| | | | | | | fixes problems in unmounting and propogation. Notes: svn path=/head/; revision=28807
* two tiny typo'sJulian Elischer1997-07-141-3/+3
| | | | Notes: svn path=/head/; revision=27389
* Fix the umount problems for DEVFS.Joerg Wunsch1997-05-031-1/+7
| | | | | | | | PR: 3276 & 3469 (the fixes), 2738, 2033 (reports) Submitted by: Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru> Notes: svn path=/head/; revision=25436
* Removed unused or apparently-unused #includes, especially of theBruce Evans1997-04-101-5/+2
| | | | | | | deprecated header <sys/dir.h>. Notes: svn path=/head/; revision=24785
* Make this compile again after the Lite2 merge.Mike Pritchard1997-02-121-3/+5
| | | | | | | | | | | Call vget/VOP_UNLOCK with the correct number of arguments. Call vn_lock where appropriate. vfs_goneall is now replaced by VOP_REVOKE. Submitted by: bde Notes: svn path=/head/; revision=22599
* changes to make devfs more 'normal'Julian Elischer1996-11-211-142/+175
| | | | | | | | | | | | | | | | | also fixes a bug I've been chasing for a LONG TIME, due to the fact that spec_bwrite is a NOP and I didn't realise it.. old symptom: mount -t devfs devfs /mnt mount /mnt/wd0e /mnt/mnt2 umount /mnt2 <process hangs> there are some pretty large structural differences internal to devfs but outwards it should look the same. I have not yet tested extensively but will do so and fix 3 warnings tomorrow. Notes: svn path=/head/; revision=19909
* devfs_tree.c: improve our bdevvp() function.Poul-Henning Kamp1996-10-281-2/+6
| | | | | | | devfs_vnops.c: move a debug printf to be consistent. Notes: svn path=/head/; revision=19230
* Started unspamming <sys/systm.h>. Don't include <machine/stdarg.h>Bruce Evans1996-09-291-1/+3
| | | | | | | | | to get the declaration of va_list; just use _BSD_VA_LIST. Fixed the 2 places that need <machine.stdarg.h> but didn't include it explicitly. Notes: svn path=/head/; revision=18556
* Updated #includes to 4.4Lite style.Bruce Evans1996-09-101-14/+15
| | | | Notes: svn path=/head/; revision=18207
* Submitted by: doug Rabson (dfr@render.com)Julian Elischer1996-08-131-2/+3
| | | | | | | | | | | | cleaning up some of the vnode usage.. (I'm sure it still needs more..) where can one find out what each vfs call expects to be locked on completion, and how can one find out what each layer expects to be freed on error.? Notes: svn path=/head/; revision=17588
* symlink support in devfs.Julian Elischer1996-08-131-27/+52
| | | | | | | | | | | | | | | | | it only barely works so don't get too carried away.. I noticed that teh symlink is length 0.. I guess I'll fix that tomorrow.. it also sometimes panics with "cleaned vnode isn't" but it's not more broken than it was before.. I really want to go over it with someone who understands the lifecycle of a vnode better than I do.. terry? kirk? david? john? Notes: svn path=/head/; revision=17567
* Only use the special bdevvp() for DEVFS if DEVFS_ROOT is defined. ThisBruce Evans1996-07-301-1/+3
| | | | | | | makes option DEVFS safe to use again (although mounting devfs is unsafe). Notes: svn path=/head/; revision=17349
* DEVFS needs a special bdevvp().Poul-Henning Kamp1996-07-241-1/+37
| | | | | | | I just noticed some junk in my patch. I'll remove that in a sec. Notes: svn path=/head/; revision=17273
* Clean up -Wunused warnings. Julian asked me to just ifdefGary Palmer1996-06-121-7/+2
| | | | | | | | | out unused code as this is still work in progress. Reviewed by: bde Notes: svn path=/head/; revision=16321
* Fix the reproto.sh script that was broken after my KNFification.Joerg Wunsch1996-04-071-16/+32
| | | | | | | Pointed out by: bde Notes: svn path=/head/; revision=15083
* KNFify the function definitions. It's harder to grep around when theJoerg Wunsch1996-04-061-26/+39
| | | | | | | function names don't start in column 1. Notes: svn path=/head/; revision=15080
* Merged devfs_add_devsw() into devfs_add_devswf()Marc G. Fournier1996-04-031-34/+17
| | | | Notes: svn path=/head/; revision=15012
* Made the src code match the man page.Marc G. Fournier1996-04-021-28/+2
| | | | | | | Removed dev_link() and dev_linkf(), replacing dev_linkf() with devfs_link() Notes: svn path=/head/; revision=14993
* Added dev_linkf() function (dev_link() + printf-style arguments)Marc G. Fournier1996-03-281-1/+54
| | | | | | | Reviewed by: julian@freebsd.org Notes: svn path=/head/; revision=14876
* Submitted by: "Marc G. Fournier" <scrappy@ki.net>Julian Elischer1996-03-251-7/+8
| | | | | | | allows correct creation of subdirectories in devfs_add_devswf() Notes: svn path=/head/; revision=14820
* really stupid mistake that stopped devices from appearing on the fly in mountedJulian Elischer1996-02-181-2/+5
| | | | | | | | | | | | DEVFS filesystems.. - if ( error = dev_add_name(child->name,parent->dnp + if ( error = dev_add_name(child->name,falias->dnp Ok bruce, this is the one you were seeing.. Notes: svn path=/head/; revision=14139