summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authortrasz <trasz@FreeBSD.org>2016-01-11 20:01:50 +0000
committertrasz <trasz@FreeBSD.org>2016-01-11 20:01:50 +0000
commit55bfa73168c6ab3fba2227fe818ec03c0c79fa5a (patch)
tree974200306a919d0c72f7d3f1c7dcfec3ff42db2a /sbin
parentabb53e398346612c26e98cfc5706888389c0babc (diff)
downloadFreeBSD-src-55bfa73168c6ab3fba2227fe818ec03c0c79fa5a.zip
FreeBSD-src-55bfa73168c6ab3fba2227fe818ec03c0c79fa5a.tar.gz
MFC 289113:
Add 'p' postfix to mdconfig(8). Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'sbin')
-rw-r--r--sbin/mdconfig/mdconfig.88
-rw-r--r--sbin/mdconfig/mdconfig.c7
2 files changed, 9 insertions, 6 deletions
diff --git a/sbin/mdconfig/mdconfig.8 b/sbin/mdconfig/mdconfig.8
index 8cb9a69..ede3045 100644
--- a/sbin/mdconfig/mdconfig.8
+++ b/sbin/mdconfig/mdconfig.8
@@ -41,7 +41,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd August 6, 2015
+.Dd October 10, 2015
.Dt MDCONFIG 8
.Os
.Sh NAME
@@ -163,11 +163,11 @@ prefix.
Size of the memory disk.
.Ar Size
is the number of 512 byte sectors unless suffixed with a
-.Cm b , k , m , g ,
+.Cm b , k , m , g , t ,
or
-.Cm t
+.Cm p
which
-denotes byte, kilobyte, megabyte, gigabyte and terabyte respectively.
+denotes byte, kilobyte, megabyte, gigabyte, terabyte and petabyte respectively.
When used without the
.Fl r
option, the
diff --git a/sbin/mdconfig/mdconfig.c b/sbin/mdconfig/mdconfig.c
index d741c77..1b4e4ce 100644
--- a/sbin/mdconfig/mdconfig.c
+++ b/sbin/mdconfig/mdconfig.c
@@ -88,8 +88,8 @@ usage(void)
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");
- fprintf(stderr, "\t\t %%dt (TB)\n");
+ fprintf(stderr, "\t\t %%dk (kB), %%dm (MB), %%dg (GB), \n");
+ fprintf(stderr, "\t\t %%dt (TB), or %%dp (PB)\n");
exit(1);
}
@@ -217,6 +217,9 @@ main(int argc, char **argv)
else if (*p == 't' || *p == 'T') {
mdio.md_mediasize <<= 30;
mdio.md_mediasize <<= 10;
+ } else if (*p == 'p' || *p == 'P') {
+ mdio.md_mediasize <<= 30;
+ mdio.md_mediasize <<= 20;
} else
errx(1, "unknown suffix on -s argument");
break;
OpenPOWER on IntegriCloud