]> xenbits.xensource.com Git - people/julieng/freebsd.git/commitdiff
Add 'p' postfix to mdconfig(8).
authortrasz <trasz@FreeBSD.org>
Sat, 10 Oct 2015 09:37:31 +0000 (09:37 +0000)
committertrasz <trasz@FreeBSD.org>
Sat, 10 Oct 2015 09:37:31 +0000 (09:37 +0000)
MFC after: 1 month
Sponsored by: The FreeBSD Foundation

sbin/mdconfig/mdconfig.8
sbin/mdconfig/mdconfig.c

index 6818d7bb951349507be9a894123ec72e2eebba7a..d5000cf1903a62d1e8796ad29ecf407585ad751b 100644 (file)
@@ -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
index d741c7770cfc902e5bceb24bc6e3884d1316333c..1b4e4ce2fa4007e626f1d0cc8644227d9d175b09 100644 (file)
@@ -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;