summaryrefslogtreecommitdiffstats
path: root/sbin/mdconfig/mdconfig.c
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2015-10-21 16:04:13 -0200
committerRenato Botelho <renato@netgate.com>2015-10-21 16:04:13 -0200
commit6dfdfbb12b356dae762c3bce132809457ed60d97 (patch)
tree4e87edfd6f7353e79d923ab457270e9351daec3d /sbin/mdconfig/mdconfig.c
parent13010d6b0da4d97e56243edbea0a585b8285cd3e (diff)
parentd621159ed6a7d1c98cf81f17e313dffc64bf7c4f (diff)
downloadFreeBSD-src-6dfdfbb12b356dae762c3bce132809457ed60d97.zip
FreeBSD-src-6dfdfbb12b356dae762c3bce132809457ed60d97.tar.gz
Merge branch 'stable/10' into devel
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