svn commit: r295261 - head/bin/dd

Edward Tomasz Napierala trasz at FreeBSD.org
Thu Feb 4 15:21:03 UTC 2016


Author: trasz
Date: Thu Feb  4 15:21:01 2016
New Revision: 295261
URL: https://svnweb.freebsd.org/changeset/base/295261

Log:
  Add 't' and 'p' postfixes to dd(1).
  
  MFC after:	1 month
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/bin/dd/args.c
  head/bin/dd/dd.1

Modified: head/bin/dd/args.c
==============================================================================
--- head/bin/dd/args.c	Thu Feb  4 15:10:08 2016	(r295260)
+++ head/bin/dd/args.c	Thu Feb  4 15:21:01 2016	(r295261)
@@ -383,6 +383,14 @@ postfix_to_mult(const char expr)
 	case 'g':
 		mult = 1 << 30;
 		break;
+	case 'T':
+	case 't':
+		mult = (uintmax_t)1 << 40;
+		break;
+	case 'P':
+	case 'p':
+		mult = (uintmax_t)1 << 50;
+		break;
 	case 'W':
 	case 'w':
 		mult = sizeof(int);

Modified: head/bin/dd/dd.1
==============================================================================
--- head/bin/dd/dd.1	Thu Feb  4 15:10:08 2016	(r295260)
+++ head/bin/dd/dd.1	Thu Feb  4 15:21:01 2016	(r295261)
@@ -32,7 +32,7 @@
 .\"     @(#)dd.1	8.2 (Berkeley) 1/13/94
 .\" $FreeBSD$
 .\"
-.Dd August 28, 2014
+.Dd February 4, 2016
 .Dt DD 1
 .Os
 .Sh NAME
@@ -332,10 +332,13 @@ If the number ends with a
 .Dq Li k ,
 .Dq Li m ,
 .Dq Li g ,
+.Dq Li t ,
+.Dq Li p ,
 or
 .Dq Li w ,
 the
-number is multiplied by 512, 1024 (1K), 1048576 (1M), 1073741824 (1G)
+number is multiplied by 512, 1024 (1K), 1048576 (1M), 1073741824 (1G),
+1099511627776 (1T), 1125899906842624 (1P)
 or the number of bytes in an integer, respectively.
 Two or more numbers may be separated by an
 .Dq Li x


More information about the svn-src-head mailing list