summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authortrasz <trasz@FreeBSD.org>2016-02-04 15:21:01 +0000
committertrasz <trasz@FreeBSD.org>2016-02-04 15:21:01 +0000
commitc73d67730ab2dedcdc1b171947392eecc94ba6dd (patch)
tree206ae23f462a394bdf978b8ee5f85fced1f3349b /bin
parentbe3acaf3333f8339b4359538cd31ad24be8791f0 (diff)
downloadFreeBSD-src-c73d67730ab2dedcdc1b171947392eecc94ba6dd.zip
FreeBSD-src-c73d67730ab2dedcdc1b171947392eecc94ba6dd.tar.gz
Add 't' and 'p' postfixes to dd(1).
MFC after: 1 month Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'bin')
-rw-r--r--bin/dd/args.c8
-rw-r--r--bin/dd/dd.17
2 files changed, 13 insertions, 2 deletions
diff --git a/bin/dd/args.c b/bin/dd/args.c
index 21e4aa1..1cbf3b3 100644
--- a/bin/dd/args.c
+++ b/bin/dd/args.c
@@ -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);
diff --git a/bin/dd/dd.1 b/bin/dd/dd.1
index 0908642..4047cdc 100644
--- a/bin/dd/dd.1
+++ b/bin/dd/dd.1
@@ -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
OpenPOWER on IntegriCloud