summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_conf.c
Commit message (Collapse)AuthorAgeFilesLines
* Convert lockmgr locks from using simple locks to using mutexes.jasone2000-10-041-2/+2
| | | | | | Add lockdestroy() and appropriate invocations, which corresponds to lockinit() and must be called to clean up after a lockmgr lock is no longer needed.
* Avoid the modules madness I inadvertently introduced by making thephk2000-09-021-58/+1
| | | | | | | | | | | | | | | | | | cloning infrastructure standard in kern_conf. Modules are now the same with or without devfs support. If you need to detect if devfs is present, in modules or elsewhere, check the integer variable "devfs_present". This happily removes an ugly hack from kern/vfs_conf.c. This forces a rename of the eventhandler and the standard clone helper function. Include <sys/eventhandler.h> in <sys/conf.h>: it's a helper #include like <sys/queue.h> Remove all #includes of opt_devfs.h they no longer matter.
* Fix panic when removing open device (found by bp@)phk2000-08-241-0/+20
| | | | | | | | | | | | Implement subdirs. Build the full "devicename" for cloning functions. Fix panic when deleted device goes away. Collaps devfs_dir and devfs_dirent structures. Add proper cloning to the /dev/fd* "device-"driver. Fix a bug in make_dev_alias() handling which made aliases appear multiple times. Use devfs_clone to implement getdiskbyname() Make specfs maintain the stat(2) timestamps per dev_t
* Make a trip to Pointy-Hats-R-Us and actually include the header thatmsmith2000-05-221-0/+2
| | | | | | defines ROOTDEVNAME. Submitted by: "Jeffrey S. Sharp" <jss@subatomix.com>
* Split the logic ofgreen2000-03-201-11/+48
| | | | | | | | | | | | | | | | | static int setrootbyname(char *name); out into dev_t getdiskbyname(char *name); This makes it easy to create a new DDB command, which is the big reason for the change. You can now do the following in DDB: Example rc.conf entry: dumpdev="/dev/ad0s1b" # Device name to crashdump to (if enabled). db> show disk/ad0s1b dev_t = 0xc0b7ea00 db> p *dumpdev c0b7ea00
* Change the mountroot prompt to something that doesn't look at all like amsmith2000-02-171-1/+1
| | | | | | | | firmware prompt. Several sleepy folk mistook the '>>>' for the SRM prompt, which was never the desired idea. Submitted by: Andrew Gallatin <gallatin@cs.duke.edu> Approved by: jkh
* Put on asbestos suit and put a splcam() around the 'Mounting root from..'peter1999-12-121-0/+3
| | | | | message to stop it splitting. Every single scsi machine I've seen seems to reliably collide with this and it's rather annoying.
* Scan cdevs for potential root devices, rather than bdevs.phk1999-12-081-6/+7
|
* Make BOOTP work again.dillon1999-11-291-1/+1
| | | | Submitted by: Doug Ambrisko <ambrisko@whistle.com>
* Use the correct mounted-from path when allocating the root mount, if we knowmsmith1999-11-281-7/+7
| | | | | | | | | | | what it is. Be more correct in unbusying the mountpoint (especially before freeing it). Remove support for mounting 'r' devices as root. You don't mount 'r' devices anywhere else, and they're going away anyway. Submitted by: bde
* Retire MFS_ROOT and MFS_ROOT_SIZE options from the MFS implementation.phk1999-11-261-0/+4
| | | | | | | | | | | | | | | | | Add MD_ROOT and MD_ROOT_SIZE options to the md driver. Make the md driver handle MFS_ROOT and MFS_ROOT_SIZE options for compatibility. Add md driver to GENERIC, PCCARD and LINT. This is a cleanup which removes the need for some of the worse hacks in MFS: We really want to have a rootvnode but MFS on a preloaded image doesn't really have one. md is a true device, so it is less trouble. This has been tested with make release, and if people remember to add the "md" pseudo-device to their kernels, PicoBSD should be just fine as well. If people have no other use for MFS, it can be removed from the kernel.
* If vfs_mountroot_try() isn't given a path to try mounting, return a silentmsmith1999-11-211-1/+1
| | | | | error rather than complaining about it verbosely. No path is not really a failure, but the diagnostic was confusing and unuseful.
* struct mountlist and struct mount.mnt_list have no business beingphk1999-11-201-1/+1
| | | | | | | | | | a CIRCLEQ. Change them to TAILQ_HEAD and TAILQ_ENTRY respectively. This removes ugly mp != (void*)&mountlist comparisons. Requested by: phk Submitted by: Jake Burkholder jake@checker.org PR: 14967
* Ignore leading 'r' in base of root device name.phk1999-11-081-0/+2
|
* Clean up a couple of initialisations in order to suppress a correctmsmith1999-11-061-2/+4
| | | | but un-useful warning.
* Guard against freeing NULL if vfs_mountroot_try is called with NULLmsmith1999-11-051-2/+4
| | | | as an argument (this is legal to make other code simpler).
* Expand the sscanf buffer to 32 bytes to make room for the expandedmsmith1999-11-051-1/+1
| | | | | | | pattern, with some space left over to avoid this mistake next time it's improved. Submitted by: luoqi
* Allow vfs names to include the digits 0-9 as well as the letters a-z.msmith1999-11-041-1/+1
| | | | | | This should let 'cd9660' filesystems be allowed. Submitted by: ghelmer
* Re-implement the handing of RB_CDROM in a machine-independant fashion.msmith1999-11-041-0/+24
| | | | | | We currently only search SCSI and IDE CDROMs; if there's felt to be a need for supporting the very old and rare soundcard etc. drives for this application they can be trivially added.
* Make MFS work with the new root filesystem search process.msmith1999-11-031-8/+10
| | | | | | | | | | | | | | | | | In order to achieve this, root filesystem mount is moved from SI_ORDER_FIRST to SI_ORDER_SECOND in the SI_SUB_MOUNT_ROOT sysinit group. Now, modules which wish to usurp the default root mount can use SI_ORDER_FIRST. A compiled-in or preloaded MFS filesystem will become the root filesystem unless the vfs.root.mountfrom environment variable refers to a valid bootable device. This will normally only be the case when the kernel and MFS image have been loaded from a disk which has a valid /etc/fstab file. In this case, the variable should be manually overridden in the loader, or the kernel booted with -a. In either case "mfs:" should be supplied as the new value. Also fix a typo in one DFLTROOT case that would not have compiled.
* This is a complete rewrite of vfs_conf.c, which changes the way the rootmsmith1999-11-011-158/+270
| | | | | | | | | | | | | | filesystem is discovered. Preference is given to using the kernel environment variable vfs.root.mountfrom, which is set by the loader according to the contents of /etc/fstab. Changes in the MD code provide fallback mechanisms for systems not using the loader. A more robust fallback path is also provided, with the last recourse being to prompt on the console for a root device. These changes drastically simplify the machine-dependant parts of the root configuration process. In addition, support for CDROM root devices has been removed; it was a nasty hack and didn't work.
* Fix BOOTP root FS mounts. Also cleanup vfs_getnewfsid() and collapsedillon1999-09-191-1/+21
| | | | | | | | | | addaliasu() into addalias() (no operational change) and clarify comments relating to a trick that vclean() uses. The fix to BOOTP is yet another hack. Actually, rootfsid handling is already a major hack. The whole thing needs to be cleaned up. Reviewed by: David Greenman <dg@root.com>, Alan Cox <alc@cs.rice.edu>
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Fix warnings in last commit (dev_t is not an int, and not even intpeter1999-07-031-3/+3
| | | | compatable in arg lists on the Alpha)
* Be more informative and try to ask the user in some instances if we can'tphk1999-07-031-3/+3
| | | | figure out the root device.
* I'm tired of having a 'hanging root device'.. This isn't a "fix", justpeter1999-06-261-1/+4
| | | | | a workaround for a specific case where cam interrupts right in the middle of this printf.
* Back out my previous change (phk didn't like it) in favour of settingjb1999-05-241-8/+1
| | | | | rootdev in the mfs initialisation code iff MFS_ROOT (which Bruce doesn't like). Damned if I do - damned if I don't.
* Make MFS_ROOT work again. MFS_ROOT means that rootdev is not set.jb1999-05-231-2/+10
| | | | | Broken by: phk Problem ignored by: phk
* Remove the SLICE code.sos1998-09-141-5/+1
| | | | | This clearly needs alot more thought, and we dont need this to hunt us down in 3.0-RELEASE.
* Pass lists of possible root devices and their names up to thebde1998-06-091-16/+28
| | | | | | | | | | | | | | | | | | | | | | | machine-independent code and try mounting the devices in the lists instead of guessing alternative root devices in a machine- dependent way. autoconf.c: Reject preposterous slice numbers instead of silently converting them to COMPATIBILITY_SLICE. Don't forget to force slice = COMPATIBILITY_SLICE in the floppy device name. Eliminated most magic numbers and magic device names in setroot(). Fixed dozens of style bugs. vfs_conf.c: Put the actual root device name instead of "root_device" in the mount struct if the actual name is available. This is useful after booting with -s. If it were set in all cases then it could be used to do mount(8)'s ROOTSLICE_HUNT and fsck(8)'s hotroot guess better.
* Make the devfs SLICE option a standard type option.julian1998-04-201-1/+2
| | | | (hopefully it will go away eventually anyhow)
* Add changes and code to implement a functional DEVFS.julian1998-04-191-2/+5
| | | | | | | | | | | | | | | | | | | | | 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.
* If the root mount fails from a device that is not the compatability slicemsmith1998-03-111-1/+13
| | | | | | | | | | | | | | | | of a disk, because that slice does not exist, try again mounting from the compatability slice. This handles the case where a disk has been initialised by 'disklabel auto', which places a bogus and invalid slice entry on the disk. The bootstrap is not smart enough to reject this slice, and pretends to boot from it. Believing the the bootstrap at this point is unwise. Booting from non-'wd' disks thus prepared is still broken, as 'disklabel -rwB xdN auto' does not initialise the disk type field, and the bootstrap mistakenly claims that the disk is handled by 'wd'. Behaviour is now consistent with DEVFS expected characteristics.
* Staticize.eivind1998-02-091-2/+2
|
* Make the BOOTP family new-style options (in opt_bootp.h)eivind1998-01-091-1/+3
|
* Cleanup my last patch herejulian1997-12-011-43/+32
| | | | Reviewed by: sef@kthrup.com and phk@freebsd.org
* Shift a few SYSINT() calls around.julian1997-11-251-2/+24
| | | | | | | | | | this results in a few functions becoming static, and the SYSINITs being close to the code they are related to. setting up the dump device is with dumpsys() and kicking off the scheduler is with the scheduler. Mounting root is with the code that does it. Reviewed by: phk
* Remove a bunch of variables which were unused both in GENERIC and LINT.phk1997-11-071-3/+1
| | | | Found by: -Wunused
* We are mounting the root.julian1997-10-161-2/+2
| | | | mount it at the HEAD of the queue, DEVFS might already be there..
* Last major round (Unless Bruce thinks of somthing :-) of malloc changes.phk1997-10-121-1/+3
| | | | | | | | 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
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-221-1/+1
| | | | ready for it yet.
* This is the kernel Lite/2 commit. There are some requisite userlanddyson1997-02-101-45/+29
| | | | | | | | | | | | | | | changes, so don't expect to be able to run the kernel as-is (very well) without the appropriate Lite/2 userland changes. The system boots and can mount UFS filesystems. Untested: ext2fs, msdosfs, NFS Known problems: Incorrect Berkeley ID strings in some files. Mount_std mounts will not work until the getfsent library routine is changed. Reviewed by: various people Submitted by: Jeffery Hsu <hsu@freebsd.org>
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Finished (?) cleaning up sysinit stuff.bde1995-12-021-7/+2
|
* 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.
* Fixed init functions argument type - caddr_t -> void *. Fixed a couple ofdg1995-09-091-4/+4
| | | | compiler warnings.
* Fix benign type mismatch in a sysinit function arg.bde1995-08-301-2/+2
|
* Reviewed by: julian with quick glances by bruce and othersjulian1995-08-281-5/+137
| | | | | | | | | | | | | | | | | | | | | | Submitted by: terry (terry lambert) This is a composite of 3 patch sets submitted by terry. they are: New low-level init code that supports loadbal modules better some cleanups in the namei code to help terry in 16-bit character support some changes to the mount-root code to make it a little more modular.. NOTE: mounting root off cdrom or NFS MIGHT be broken as I haven't been able to test those cases.. certainly mounting root of disk still works just fine.. mfs should work but is untested. (tomorrows task) The low level init stuff includes a total rewrite of init_main.c to make it possible for new modules to have an init phase by simply adding an entry to a TEXT_SET (or is it DATA_SET) list. thus a new module can be added to the kernel without editing any other files other than the 'files' file.
* Make a kernel sans FFS possible.phk1994-11-121-11/+2
|
* Implemented loadable VFS modules, and made most existing filesystemswollman1994-09-211-217/+1
| | | | loadable. (NFS is a notable exception.)
OpenPOWER on IntegriCloud