From 519bd9674475349375f1ec1538f390a70532b350 Mon Sep 17 00:00:00 2001 From: Simon Morgan Date: Wed, 25 Feb 2009 18:56:28 +0000 Subject: [PATCH] If verbose output is specified, print a '.' at every block write. --- TODO | 1 + main.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/TODO b/TODO index 4a753e3..4c3a9b8 100644 --- a/TODO +++ b/TODO @@ -1,3 +1,4 @@ +Doesn't seem to work on FAT32. Filename too long? Recursive deletion. Run splint. Look into using alloca. diff --git a/main.c b/main.c index 0f7e383..4605911 100644 --- a/main.c +++ b/main.c @@ -107,6 +107,12 @@ static int fzero(const char *path) { while (written < stbuf.st_size) { written += write(fd, buf, stbuf.st_blksize); + if (verbose) { + putchar('.'); + } + } + if (verbose) { + putchar('\n'); } fdatasync(fd); -- 2.11.4.GIT