diff options
author | Mattias Andrée <maandree@kth.se> | 2024-09-22 00:17:14 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2024-09-22 00:17:14 +0200 |
commit | b968f8ed826b9cc662c1a484040c55b0e0ad18c4 (patch) | |
tree | 9b69a95fb5154d14837991bef604fd25585f7087 /deadshred.c | |
parent | Periodically save progress (diff) | |
download | deadshred-b968f8ed826b9cc662c1a484040c55b0e0ad18c4.tar.gz deadshred-b968f8ed826b9cc662c1a484040c55b0e0ad18c4.tar.bz2 deadshred-b968f8ed826b9cc662c1a484040c55b0e0ad18c4.tar.xz |
Expose device information in confirmation prompt
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | deadshred.c | 6 |
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 { */ |