aboutsummaryrefslogtreecommitdiff
path: root/sbin/mdconfig
diff options
context:
space:
mode:
authorEdward Tomasz Napierala <trasz@FreeBSD.org>2015-10-10 09:37:31 +0000
committerEdward Tomasz Napierala <trasz@FreeBSD.org>2015-10-10 09:37:31 +0000
commitd5b0fb47eb0bdf81d19eae576791aa4abf6dd676 (patch)
treed91376b3ebb69374e8e0bf1cb5e9316cbd48b68b /sbin/mdconfig
parent92001b9497ae99ff4a5b7d4530da5440a00c4a6a (diff)
downloadsrc-d5b0fb47eb0bdf81d19eae576791aa4abf6dd676.tar.gz
src-d5b0fb47eb0bdf81d19eae576791aa4abf6dd676.zip
Add 'p' postfix to mdconfig(8).
MFC after: 1 month Sponsored by: The FreeBSD Foundation
Notes
Notes: svn path=/head/; revision=289113
Diffstat (limited to 'sbin/mdconfig')
-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 6818d7bb9513..d5000cf1903a 100644
--- a/sbin/mdconfig/mdconfig.8
+++ b/sbin/mdconfig/mdconfig.8
@@ -37,7 +37,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd August 6, 2015
+.Dd October 10, 2015
.Dt MDCONFIG 8
.Os
.Sh NAME
@@ -159,11 +159,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 d741c7770cfc..1b4e4ce2fa40 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;