From owner-svn-src-stable-10@freebsd.org Mon Jan 11 20:01:52 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7FBB9A6B868; Mon, 11 Jan 2016 20:01:52 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3673E1003; Mon, 11 Jan 2016 20:01:52 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0BK1ph1076784; Mon, 11 Jan 2016 20:01:51 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0BK1pPY076782; Mon, 11 Jan 2016 20:01:51 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201601112001.u0BK1pPY076782@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 11 Jan 2016 20:01:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r293690 - stable/10/sbin/mdconfig X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2016 20:01:52 -0000 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;