* Add support for the -a and -s options to logsave.
* Change e2fsck to bracket its progress bar output with ctrl-A and ctrl-B
characters, so that logsave -s can omit writing the progress bar output
to the log file.
diff --git a/e2fsck/unix.c b/e2fsck/unix.c
index 3c3acad..2675c1c 100644
--- a/e2fsck/unix.c
+++ b/e2fsck/unix.c
@@ -328,7 +328,8 @@
if (!(ctx->flags & E2F_FLAG_PROG_BAR))
return;
- printf("%s\r", spaces + (sizeof(spaces) - 80));
+ printf("\001%s\r\002", spaces + (sizeof(spaces) - 80));
+ fflush(stdout);
ctx->flags &= ~E2F_FLAG_PROG_BAR;
}
@@ -379,16 +380,16 @@
dpywidth -= 8;
i = ((percent * dpywidth) + 50) / 100;
- printf("%s: |%s%s", label, bar + (sizeof(bar) - (i+1)),
+ printf("\001%s: |%s%s", label, bar + (sizeof(bar) - (i+1)),
spaces + (sizeof(spaces) - (dpywidth - i + 1)));
if (percent == 100.0)
fputc('|', stdout);
else
fputc(spinner[ctx->progress_pos & 3], stdout);
if (dpynum)
- printf(" %4.1f%% %u\r", percent, dpynum);
+ printf(" %4.1f%% %u\r\002", percent, dpynum);
else
- printf(" %4.1f%% \r", percent);
+ printf(" %4.1f%% \r\002", percent);
if (percent == 100.0)
e2fsck_clear_progbar(ctx);