summaryrefslogtreecommitdiffstats
path: root/sbin/mdconfig/mdconfig.c
diff options
context:
space:
mode:
authortrasz <trasz@FreeBSD.org>2015-10-18 14:52:31 +0000
committertrasz <trasz@FreeBSD.org>2015-10-18 14:52:31 +0000
commitd3fb3a1ab26c790031581aa03fda3c00b29cfd4c (patch)
treef6bf76dab2947b461680cebbbc5ae5fa1048b68c /sbin/mdconfig/mdconfig.c
parent71228bfa842cbb3ff7cba8a27f18794bc9a46995 (diff)
downloadFreeBSD-src-d3fb3a1ab26c790031581aa03fda3c00b29cfd4c.zip
FreeBSD-src-d3fb3a1ab26c790031581aa03fda3c00b29cfd4c.tar.gz
MFC r258909:
Tweak mdconfig(8) manual page, in particular revise the EXAMPLES section. This removes stuff that doesn't really belong there, and simplifies examples for the basic operations. Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'sbin/mdconfig/mdconfig.c')
-rw-r--r--sbin/mdconfig/mdconfig.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sbin/mdconfig/mdconfig.c b/sbin/mdconfig/mdconfig.c
index 4257dd7..d741c77 100644
--- a/sbin/mdconfig/mdconfig.c
+++ b/sbin/mdconfig/mdconfig.c
@@ -155,6 +155,9 @@ main(int argc, char **argv)
} else if (!strcmp(optarg, "swap")) {
mdio.md_type = MD_SWAP;
mdio.md_options |= MD_CLUSTER | MD_AUTOUNIT | MD_COMPRESS;
+ } else if (!strcmp(optarg, "null")) {
+ mdio.md_type = MD_NULL;
+ mdio.md_options |= MD_CLUSTER | MD_AUTOUNIT | MD_COMPRESS;
} else
errx(1, "unknown type: %s", optarg);
break;
@@ -287,9 +290,10 @@ main(int argc, char **argv)
}
}
- if ((mdio.md_type == MD_MALLOC || mdio.md_type == MD_SWAP) &&
- sflag == NULL)
- errx(1, "must specify -s for -t malloc or -t swap");
+ if ((mdio.md_type == MD_MALLOC || mdio.md_type == MD_SWAP ||
+ mdio.md_type == MD_NULL) && sflag == NULL)
+ errx(1, "must specify -s for -t malloc, -t swap, "
+ "or -t null");
if (mdio.md_type == MD_VNODE && mdio.md_file[0] == '\0')
errx(1, "must specify -f for -t vnode");
} else {
OpenPOWER on IntegriCloud