aboutsummaryrefslogtreecommitdiff
path: root/sbin/mdconfig
diff options
context:
space:
mode:
authorDavid E. O'Brien <obrien@FreeBSD.org>2013-02-08 16:10:16 +0000
committerDavid E. O'Brien <obrien@FreeBSD.org>2013-02-08 16:10:16 +0000
commitd9a447559bc04121f7c6682e64abe67efa154864 (patch)
treeb2f038222ff8a70f687652441df00d2b564c8abe /sbin/mdconfig
parent3cbf5f97aafc2b249c509ee1162c47c9b28e591e (diff)
parentfbda3d5daeeb730a49d025b614b35a32f0319718 (diff)
downloadsrc-d9a447559bc04121f7c6682e64abe67efa154864.tar.gz
src-d9a447559bc04121f7c6682e64abe67efa154864.zip
Sync with HEAD.
Notes
Notes: svn path=/projects/bmake/; revision=246555
Diffstat (limited to 'sbin/mdconfig')
-rw-r--r--sbin/mdconfig/mdconfig.814
-rw-r--r--sbin/mdconfig/mdconfig.c4
2 files changed, 14 insertions, 4 deletions
diff --git a/sbin/mdconfig/mdconfig.8 b/sbin/mdconfig/mdconfig.8
index 89f150e8d1a4..c18027cabb94 100644
--- a/sbin/mdconfig/mdconfig.8
+++ b/sbin/mdconfig/mdconfig.8
@@ -41,7 +41,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd June 27, 2012
+.Dd November 3, 2012
.Dt MDCONFIG 8
.Os
.Sh NAME
@@ -267,6 +267,18 @@ are implied
device, and then mount the new memory disk:
.Bd -literal -offset indent
mount -t cd9660 /dev/`mdconfig -f cdimage.iso` /mnt
+.Pp
+.Ed
+Create a file-backed device from a hard disk image that begins
+with 512K of raw header information.
+.Xr gnop 8
+is used to skip over the header information, positioning
+.Pa md1.nop
+to the start of the filesystem in the image.
+.Bd -literal -offset indent
+mdconfig -f diskimage.img -u 1
+gnop create -o 512K md1
+mount /dev/md1.nop /mnt
.Ed
.Sh SEE ALSO
.Xr md 4 ,
diff --git a/sbin/mdconfig/mdconfig.c b/sbin/mdconfig/mdconfig.c
index 55d1567ca970..70cefe916d19 100644
--- a/sbin/mdconfig/mdconfig.c
+++ b/sbin/mdconfig/mdconfig.c
@@ -84,7 +84,7 @@ usage(void)
" mdconfig -r -u unit -s size [-o [no]force]\n"
" mdconfig -l [-v] [-n] [-u unit]\n"
" mdconfig file\n");
- fprintf(stderr, "\t\ttype = {malloc, preload, vnode, swap}\n");
+ fprintf(stderr, "\t\ttype = {malloc, vnode, swap}\n");
fprintf(stderr, "\t\toption = {cluster, compress, reserve}\n");
fprintf(stderr, "\t\tsize = %%d (512 byte blocks), %%db (B),\n");
fprintf(stderr, "\t\t %%dk (kB), %%dm (MB), %%dg (GB) or\n");
@@ -148,8 +148,6 @@ main(int argc, char **argv)
if (!strcmp(optarg, "malloc")) {
mdio.md_type = MD_MALLOC;
mdio.md_options |= MD_AUTOUNIT | MD_COMPRESS;
- } else if (!strcmp(optarg, "preload")) {
- mdio.md_type = MD_PRELOAD;
} else if (!strcmp(optarg, "vnode")) {
mdio.md_type = MD_VNODE;
mdio.md_options |= MD_CLUSTER | MD_AUTOUNIT | MD_COMPRESS;