diff options
| author | Lukas Ertl <le@FreeBSD.org> | 2004-07-22 13:38:10 +0000 |
|---|---|---|
| committer | Lukas Ertl <le@FreeBSD.org> | 2004-07-22 13:38:10 +0000 |
| commit | 6b61c155e62f929b7ebbeb6babe6f1e774c23f5c (patch) | |
| tree | 3b4ff5937d46b983bac6e2659be82ce31412aa8b /usr.bin/truncate | |
| parent | aae01d2439166bb4eec5d1c06fd1e09b18309c0f (diff) | |
Notes
Diffstat (limited to 'usr.bin/truncate')
| -rw-r--r-- | usr.bin/truncate/truncate.1 | 6 | ||||
| -rw-r--r-- | usr.bin/truncate/truncate.c | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/truncate/truncate.1 b/usr.bin/truncate/truncate.1 index 6c1d65784c29..9449939ec67d 100644 --- a/usr.bin/truncate/truncate.1 +++ b/usr.bin/truncate/truncate.1 @@ -39,7 +39,7 @@ .Sm off .Op Cm + | - .Ar size -.Op Cm K | M | G +.Op Cm K | k | M | m | G | g .Sm on .Xc .Ek @@ -71,7 +71,7 @@ Truncate files to the length of the file .Sm off .Op Cm + | - .Ar size -.Op Cm K | M | G +.Op Cm K | k | M | m | G | g .Sm on .Xc If the @@ -97,7 +97,7 @@ argument may be suffixed with one of .Cm M or .Cm G -to indicate a multiple of +(either upper or lower case) to indicate a multiple of Kilobytes, Megabytes or Gigabytes respectively. .El diff --git a/usr.bin/truncate/truncate.c b/usr.bin/truncate/truncate.c index 2901ae9c8756..60119356c9f0 100644 --- a/usr.bin/truncate/truncate.c +++ b/usr.bin/truncate/truncate.c @@ -177,12 +177,15 @@ parselength(char *ls, off_t *sz) switch (*ls) { case 'G': + case 'g': oflow = length * 1024; ASSIGN_CHK_OFLOW(oflow, length); case 'M': + case 'm': oflow = length * 1024; ASSIGN_CHK_OFLOW(oflow, length); case 'K': + case 'k': if (ls[1] != '\0') return -1; oflow = length * 1024; |
