Commit Graph

38 Commits

Author SHA1 Message Date
keramida
a56381b175 Make sure strsep() gets a nul-terminated string.
Reviewed by:	phk
2002-10-10 10:07:19 +00:00
phk
34e71fb635 Don't show disklabel in the examples, it is not necessary. 2002-09-26 21:29:10 +00:00
trhodes
8dde7c54b8 s/filesystem/file system/g as discussed on -developers 2002-08-21 18:11:48 +00:00
imp
cf37df614d Don't use NULL where you really mean 0 to sysctlbyname. 2002-08-21 15:15:15 +00:00
rse
089c69d76e Replace extra call to "tunefs" with the equivalent of "newfs -U".
Reviewed by:	phk
2002-07-15 11:30:21 +00:00
charnier
548d38d27c The .Nm utility 2002-07-06 19:34:18 +00:00
des
c91c856b3e Usage style sweep: spell "usage" with a small 'u'.
Also change one case of blatant __progname abuse (several more remain)
This commit does not touch anything in src/{contrib,crypto,gnu}/.
2002-04-22 13:44:47 +00:00
mike
e3adb62dc6 Revert 1.20:
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.
2002-03-21 12:03:09 +00:00
mike
88244def1c Provide a proper error message in mdconfig(8) when a filesystem is too
small, instead of a less meaningful error in newfs(8).
2002-03-21 07:46:09 +00:00
dd
2af26e9320 Actually make use of the md_version field of 'struct mdio'. In order
not to needlessly break compatibility, decrement MDIOVERSION to 0.

Approved by:	phk
2001-12-20 06:38:21 +00:00
obrien
a537f22ad4 Default to WARNS=2.
Binary builds that cannot handle this must explicitly set WARNS=0.

Reviewed by:	mike
2001-12-04 02:19:58 +00:00
ru
d88513dbae mdoc(7) police: removed (now gratuitous) .Xo/.Xc brackets. 2001-08-10 10:41:30 +00:00
dd
474a84333b Move all the prototypes to one place. 2001-08-07 19:27:46 +00:00
dd
f174811aa2 Introduce a force option, MD_FORCE, that instructs the driver to
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
2001-08-07 19:23:16 +00:00
dd
46af69d151 Use MD_NAME and MDCTL_NAME constants where appropriate. 2001-07-18 13:32:38 +00:00
dd
c49a4e6620 Remove whitespace at EOL. 2001-07-15 07:53:42 +00:00
ru
cb3283b5da mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 11:04:34 +00:00
dd
bbaeff8b29 Constify mdmaybeload(), add a prototype for usage(), and get rid of a
sizeof(int) == sizeof(long) assumption; clamp down with WARNS=2.
2001-06-21 02:10:26 +00:00
dd
e0b1675e89 Don't assume the length of MD_NAME is 2. 2001-06-21 01:39:01 +00:00
dd
1d63e53afe Fail if -s isn't specified for an MD_MALLOC or MD_SWAP disk; the
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
2001-06-21 01:36:09 +00:00
ru
e7c03cd6b0 - Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.
2001-03-26 14:33:27 +00:00
ru
e2a472a47a Set the default manual section for sbin/ to 8. 2001-03-20 18:13:31 +00:00
ru
e31294bd61 mdoc(7) police: add a missing An call. 2001-03-12 09:18:12 +00:00
sobomax
a217ffd7d5 In the absence of explicit `-t type'' option assume that `-f file''
implies ``-t vnode''.

Approved by:	phk
2001-03-09 21:15:08 +00:00
phk
75afbf0041 Make md(4) and mdconfig(8) take over the role of vn(4) and vnconfig(8)
entirely as previously advertised.

md(4) adopted all assets of vn(4) some time back and has proper devfs
support and cloning abilities to boot.
2001-03-09 20:09:28 +00:00
phk
4ea37f2fcc 1) If mdconfig isn't given an action argument, it assumes detach.
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"
2001-03-09 20:05:06 +00:00
phk
ddcf00ec76 Remove "autounit" from settable options, it's the default unless you
specify -u.

Spotted by:	dcs
2001-02-26 15:31:47 +00:00
phk
cb4dc88c1d Forgot to remove unneeded "intcmp" function. 2001-02-25 13:14:41 +00:00
phk
dc1a4fe257 Make "md" and "mdctl" macroized parameters.
Implement "-l" option to mdconfig which can list one or all md devices.

Submitted by:   Dima Dorfman <dima@unixfreak.org>
2001-02-25 13:12:57 +00:00
phk
4cc2d77d23 Make md/mdconfig do kld.
Submitted by:	dcs
2001-02-24 16:26:41 +00:00
phk
52eef69973 Strip optional prefixes "/dev/" and "md" from the -u argument. 2001-01-31 08:41:18 +00:00
phk
3fc2302319 Duh, the version of mdconfig.c I committed came from the wrong machine.
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.
2001-01-28 20:17:46 +00:00
phk
c2a54fd98c Don't specify fragment size, it autosizes from the sectorsize.
Remember to set mode 1777 on /tmp

Submitted by:	mjacob
2001-01-28 20:03:02 +00:00
ru
b8c8d16c77 Mdoc(7)ify. 2001-01-10 14:53:46 +00:00
phk
b7ed866b94 Add padding space and a version number to the md_ioctl structre for future
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)
2001-01-01 23:08:26 +00:00
phk
f5d33e675c This is the first snapshot of the new all-singing-and-dancing md(4).
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.
2000-12-31 13:03:42 +00:00
phk
389eefdccf Improve cmdline parsing and messages.
Add a rudimentary man-page.  (I'm no mdoc wizard, feel free to attack my
mistakes and blunders)
2000-12-31 11:20:49 +00:00
phk
15da8fdd93 Preliminary scaffolding for the new integrated vn+md device driver.
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.
2000-12-28 20:57:57 +00:00