Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 May 2020 10:55:34 +0000 (UTC)
From:      Poul-Henning Kamp <phk@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r360841 - head/sbin/recoverdisk
Message-ID:  <202005091055.049AtYSD061878@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: phk
Date: Sat May  9 10:55:34 2020
New Revision: 360841
URL: https://svnweb.freebsd.org/changeset/base/360841

Log:
  Don't send clear screen until we are committed to run.

Modified:
  head/sbin/recoverdisk/recoverdisk.c

Modified: head/sbin/recoverdisk/recoverdisk.c
==============================================================================
--- head/sbin/recoverdisk/recoverdisk.c	Sat May  9 10:30:06 2020	(r360840)
+++ head/sbin/recoverdisk/recoverdisk.c	Sat May  9 10:55:34 2020	(r360841)
@@ -153,7 +153,6 @@ set_verbose(void)
 
 	if (!isatty(STDIN_FILENO) || ioctl(STDIN_FILENO, TIOCGWINSZ, &wsz))
 		return;
-	printf("\x1b[2J");
 	verbose = 1;
 	t0 = time(NULL);
 }
@@ -538,6 +537,8 @@ main(int argc, char * const argv[])
 	sz = 0;
 	if (!verbose)
 		report_header(0);
+	else
+		printf("\x1b[2J");
 	n = 0;
 	for (;;) {
 		lp = TAILQ_FIRST(&lumps);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202005091055.049AtYSD061878>