aboutsummaryrefslogtreecommitdiffstats
path: root/deadshred.c
diff options
context:
space:
mode:
Diffstat (limited to 'deadshred.c')
-rw-r--r--deadshred.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/deadshred.c b/deadshred.c
index 8b8a74c..baa7bf6 100644
--- a/deadshred.c
+++ b/deadshred.c
@@ -57,8 +57,8 @@ print_status(int done, struct status *s)
libsimple_difftimespec(&time_spent, &s->now, &start_time);
sprintf(bufi == 0 ? buf1 : buf2,
- "%ji bytes (%s, %s, %.2lf %%) of %s (%s) shredded\033[K\n"
- "failed writes: %ju; bad sections: %ju (%ji bytes, %s, %s)\033[K\n"
+ "%ji byte%s (%s, %s, %.2lf %%) of %s (%s) shredded\033[K\n"
+ "failed writes: %ju; bad sections: %ju (%ji byte%s, %s, %s)\033[K\n"
"time spent shredding: %s; performance: %s\033[K\n"
"time since last successful write: %s\033[K\n"
"maximum time until a successful write: %s\033[K\n"
@@ -66,6 +66,7 @@ print_status(int done, struct status *s)
"%s",
/* line 1 { */
(intmax_t)s->shredded,
+ s->shredded == 1 ? "" : "s",
humansize1000(s->shredded, subbuf1),
humansize1024(s->shredded, subbuf2),
100 * (double)s->shredded / (double)total_size,
@@ -75,6 +76,7 @@ print_status(int done, struct status *s)
s->bad_writes,
s->bad_sections,
(intmax_t)s->bad_bytes,
+ s->bad_bytes == 1 ? "" : "s",
humansize1000(s->bad_bytes, subbuf3),
humansize1024(s->bad_bytes, subbuf4),
/* } line 3 { */