mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-03 14:48:57 +00:00
Make attach the default for -f. That way
mdconfig -f image works like a charm. Reviewed by: phk (some time ago) MFC: 1 week
This commit is contained in:
parent
5a16cfaeb6
commit
1253fe1ead
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=166852
@ -195,10 +195,14 @@ mount /dev/md10 /tmp
|
||||
chmod 1777 /tmp
|
||||
.Ed
|
||||
.Pp
|
||||
To create a 5MB file-backed disk:
|
||||
To create a 5MB file-backed disk (
|
||||
.Fl -a
|
||||
and
|
||||
.Fl -t Ar vnode
|
||||
are implied):
|
||||
.Bd -literal -offset indent
|
||||
dd if=/dev/zero of=somebackingfile bs=1k count=5k
|
||||
mdconfig -a -t vnode -f somebackingfile -u 0
|
||||
mdconfig -f somebackingfile -u 0
|
||||
bsdlabel -w md0 auto
|
||||
newfs md0c
|
||||
mount /dev/md0c /mnt
|
||||
|
@ -130,8 +130,12 @@ main(int argc, char **argv)
|
||||
cmdline=2;
|
||||
break;
|
||||
case 'f':
|
||||
if (cmdline != 1 && cmdline != 2)
|
||||
if (cmdline != 0 && cmdline != 1 && cmdline != 2)
|
||||
usage();
|
||||
if (cmdline == 0) {
|
||||
action = ATTACH;
|
||||
cmdline = 1;
|
||||
}
|
||||
if (cmdline == 1) {
|
||||
/* Imply ``-t vnode'' */
|
||||
mdio.md_type = MD_VNODE;
|
||||
|
Loading…
Reference in New Issue
Block a user