svn commit: r293690 - stable/10/sbin/mdconfig

Edward Tomasz Napierala trasz at FreeBSD.org
Mon Jan 11 20:01:52 UTC 2016


Author: trasz
Date: Mon Jan 11 20:01:50 2016
New Revision: 293690
URL: https://svnweb.freebsd.org/changeset/base/293690

Log:
  MFC 289113:
  
  Add 'p' postfix to mdconfig(8).
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/10/sbin/mdconfig/mdconfig.8
  stable/10/sbin/mdconfig/mdconfig.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sbin/mdconfig/mdconfig.8
==============================================================================
--- stable/10/sbin/mdconfig/mdconfig.8	Mon Jan 11 20:00:21 2016	(r293689)
+++ stable/10/sbin/mdconfig/mdconfig.8	Mon Jan 11 20:01:50 2016	(r293690)
@@ -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

Modified: stable/10/sbin/mdconfig/mdconfig.c
==============================================================================
--- stable/10/sbin/mdconfig/mdconfig.c	Mon Jan 11 20:00:21 2016	(r293689)
+++ stable/10/sbin/mdconfig/mdconfig.c	Mon Jan 11 20:01:50 2016	(r293690)
@@ -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;


More information about the svn-src-all mailing list