aboutsummaryrefslogtreecommitdiff
path: root/sbin/mdconfig/mdconfig.c
Commit message (Collapse)AuthorAgeFilesLines
* Add a couple of undocumented test options to MD(4) to aid in regressionPoul-Henning Kamp2003-04-091-1/+11
| | | | | | | testting of GEOM. Notes: svn path=/head/; revision=113289
* Give clearer diagnostics on some cases of invalidYaroslav Tykhiy2003-04-011-0/+6
| | | | | | | | | | combinations of mdconfig(8) command-line arguments. Make mdconfig(8) accept "-a -f file -o options" equally with "-a -f file" (assuming "-t vnode".) Notes: svn path=/head/; revision=112947
* Add a "-S sectorsize" option to enable Kirk to find a bug :-)Poul-Henning Kamp2003-03-031-2/+7
| | | | Notes: svn path=/head/; revision=111818
* Don't use the kern.disks sysctl to find a list of md devices, use thePoul-Henning Kamp2003-01-271-41/+7
| | | | | | | | | MDIOCLIST ioctl instead. Spotted by: keramida Notes: svn path=/head/; revision=109930
* Make sure strsep() gets a nul-terminated string.Giorgos Keramidas2002-10-101-1/+2
| | | | | | | Reviewed by: phk Notes: svn path=/head/; revision=104773
* Don't use NULL where you really mean 0 to sysctlbyname.Warner Losh2002-08-211-1/+1
| | | | Notes: svn path=/head/; revision=102224
* Usage style sweep: spell "usage" with a small 'u'.Dag-Erling Smørgrav2002-04-221-1/+1
| | | | | | | | Also change one case of blatant __progname abuse (several more remain) This commit does not touch anything in src/{contrib,crypto,gnu}/. Notes: svn path=/head/; revision=95258
* Revert 1.20:Mike Barcroft2002-03-211-2/+0
| | | | | | | | Memory disks may be used for other purposes besides newfs(8), so it isn't helpful to require the minimum size meet newfs(8)'s criteria. Notes: svn path=/head/; revision=92874
* Provide a proper error message in mdconfig(8) when a filesystem is tooMike Barcroft2002-03-211-0/+2
| | | | | | | small, instead of a less meaningful error in newfs(8). Notes: svn path=/head/; revision=92866
* Actually make use of the md_version field of 'struct mdio'. In orderDima Dorfman2001-12-201-0/+2
| | | | | | | | | not to needlessly break compatibility, decrement MDIOVERSION to 0. Approved by: phk Notes: svn path=/head/; revision=88249
* Move all the prototypes to one place.Dima Dorfman2001-08-071-3/+2
| | | | Notes: svn path=/head/; revision=81258
* Introduce a force option, MD_FORCE, that instructs the driver toDima Dorfman2001-08-071-0/+4
| | | | | | | | | | | | | | | | | | | bypass some extra anti-foot-shooting measures. Currently, its only effect is to allow detaching a device while it's still open (e.g., mounted). This is useful for testing how the system reacts to a disk suddenly going away, which can happen with some removeable media. At this point, the force option is only checked on detach, so it would've been possible to allow the option to be passed with the MDIOCDETACH operation. This was not done to allow the possibility of having the force flag influence other tests in the future, which may not necessarily deal with detaching the device. Reviewed by: sobomax Approved by: phk Notes: svn path=/head/; revision=81257
* Use MD_NAME and MDCTL_NAME constants where appropriate.Dima Dorfman2001-07-181-1/+2
| | | | Notes: svn path=/head/; revision=79863
* Constify mdmaybeload(), add a prototype for usage(), and get rid of aDima Dorfman2001-06-211-3/+5
| | | | | | | sizeof(int) == sizeof(long) assumption; clamp down with WARNS=2. Notes: svn path=/head/; revision=78526
* Don't assume the length of MD_NAME is 2.Dima Dorfman2001-06-211-2/+2
| | | | Notes: svn path=/head/; revision=78525
* Fail if -s isn't specified for an MD_MALLOC or MD_SWAP disk; theDima Dorfman2001-06-211-1/+7
| | | | | | | | | | | | | driver itself obviously won't configure such a disk, but the error returned (EDOM) is more cryptic to the average user than it should be. Also assert that the argument to -u is in fact a valid unit; don't just accept any string to mean 0. Approved by: phk Notes: svn path=/head/; revision=78524
* In the absence of explicit ``-t type'' option assume that ``-f file''Maxim Sobolev2001-03-091-1/+6
| | | | | | | | | implies ``-t vnode''. Approved by: phk Notes: svn path=/head/; revision=74052
* 1) If mdconfig isn't given an action argument, it assumes detach.Poul-Henning Kamp2001-03-091-4/+5
| | | | | | | | | | | | 2) Running `mdconfig -l` without any attached devices results in mdconfig printing "md0" to standard output. Submitted by: dd [1] [1] no, not "dd(1)" but "Dima Dorfman" Notes: svn path=/head/; revision=74044
* Remove "autounit" from settable options, it's the default unless youPoul-Henning Kamp2001-02-261-5/+1
| | | | | | | | | specify -u. Spotted by: dcs Notes: svn path=/head/; revision=73094
* Forgot to remove unneeded "intcmp" function.Poul-Henning Kamp2001-02-251-8/+0
| | | | Notes: svn path=/head/; revision=73027
* Make "md" and "mdctl" macroized parameters.Poul-Henning Kamp2001-02-251-10/+124
| | | | | | | | | Implement "-l" option to mdconfig which can list one or all md devices. Submitted by: Dima Dorfman <dima@unixfreak.org> Notes: svn path=/head/; revision=73026
* Make md/mdconfig do kld.Poul-Henning Kamp2001-02-241-0/+36
| | | | | | | Submitted by: dcs Notes: svn path=/head/; revision=72981
* Strip optional prefixes "/dev/" and "md" from the -u argument.Poul-Henning Kamp2001-01-311-0/+5
| | | | Notes: svn path=/head/; revision=71865
* Duh, the version of mdconfig.c I committed came from the wrong machine.Poul-Henning Kamp2001-01-281-1/+1
| | | | | | | | | | Commit the right version, but without the -b option which is too evil for the present. Remove -b and preload from the manpage as well. Notes: svn path=/head/; revision=71745
* Add padding space and a version number to the md_ioctl structre for futurePoul-Henning Kamp2001-01-011-1/+1
| | | | | | | | | | | | | | | extension. Add ability to create a preload disk giving an address and a length (suggested by imp) Fix bug relating to very small md(4) devices. Update md.c copyright to reflect the status of code copied from vn.c. (noticed by dillon) Notes: svn path=/head/; revision=70573
* This is the first snapshot of the new all-singing-and-dancing md(4).Poul-Henning Kamp2000-12-311-6/+13
| | | | | | | | | Using the mdconfig(8) program you can now configure memory disks on malloc(9), swap or a file/vnode. preloaded md disks also work as usual. Notes: svn path=/head/; revision=70541
* Improve cmdline parsing and messages.Poul-Henning Kamp2000-12-311-19/+64
| | | | | | | | Add a rudimentary man-page. (I'm no mdoc wizard, feel free to attack my mistakes and blunders) Notes: svn path=/head/; revision=70538
* Preliminary scaffolding for the new integrated vn+md device driver.Poul-Henning Kamp2000-12-281-0/+101
I decided to work on the md(4) driver and integrate the vn(4) functionality into it mainly based on the name being more suitable. Ideally 'vd' as in "virtual disk" would probably be the most logical but our sound-master pointed out that this would cause uncontrollable fits of giggles in the brits. Another complication would the needed changes to the ramdisk boot/root functionality. The vn driver will stay around for some time after I complete this merge for transition reasons, and I'll make it whine to people that they should migrate to the md(4) driver for some time before it dies. The kernel part of the new md(4) driver will be committed after more testing. Notes: svn path=/head/; revision=70448