summaryrefslogtreecommitdiffstats
path: root/parse.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2016-12-20 21:30:46 -0500
committerTavian Barnes <tavianator@tavianator.com>2016-12-20 21:31:36 -0500
commit11e8c667f62ef3a1a0b099013352ba6053595142 (patch)
treeec42e4bac4084c73b1fca3748b3300b00af40682 /parse.c
parent0609e6f29719a7e88b8233d6bd5b75509a2d59f5 (diff)
downloadbfs-11e8c667f62ef3a1a0b099013352ba6053595142.tar.xz
Add tera and peta suffices for -size
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/parse.c b/parse.c
index 64ed11b..c1cfd3a 100644
--- a/parse.c
+++ b/parse.c
@@ -1645,6 +1645,12 @@ static struct expr *parse_size(struct parser_state *state, int arg1, int arg2) {
case 'G':
expr->size_unit = SIZE_GB;
break;
+ case 'T':
+ expr->size_unit = SIZE_TB;
+ break;
+ case 'P':
+ expr->size_unit = SIZE_PB;
+ break;
default:
goto bad_unit;
@@ -1654,7 +1660,7 @@ static struct expr *parse_size(struct parser_state *state, int arg1, int arg2) {
bad_unit:
pretty_error(state->cmdline->stderr_colors,
- "error: %s %s: Expected a size unit of 'b', 'c', 'w', 'k', 'M', or 'G'; found %s.\n",
+ "error: %s %s: Expected a size unit (one of bcwkMGTP); found %s.\n",
expr->argv[0], expr->argv[1], unit);
fail:
free_expr(expr);