summaryrefslogtreecommitdiffstats
path: root/sys/boot/common
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1998-10-11 10:10:41 +0000
committerpeter <peter@FreeBSD.org>1998-10-11 10:10:41 +0000
commitf90e8eba2506baab7991db1b7476611d6674b5ac (patch)
tree83395b842c087a6572599a20c4998ce2abc0e5d8 /sys/boot/common
parent000dea089b69ac4d12c2e866ee33c8feac228813 (diff)
downloadFreeBSD-src-f90e8eba2506baab7991db1b7476611d6674b5ac.zip
FreeBSD-src-f90e8eba2506baab7991db1b7476611d6674b5ac.tar.gz
Cosmetic: After the autoboot timeout, print a \n.
Diffstat (limited to 'sys/boot/common')
-rw-r--r--sys/boot/common/boot.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/boot/common/boot.c b/sys/boot/common/boot.c
index d54201c..0a1e624 100644
--- a/sys/boot/common/boot.c
+++ b/sys/boot/common/boot.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: boot.c,v 1.4 1998/10/02 16:22:26 msmith Exp $
+ * $Id: boot.c,v 1.5 1998/10/07 02:38:26 msmith Exp $
*/
/*
@@ -166,7 +166,7 @@ int
autoboot(int delay, char *prompt)
{
time_t when, otime, ntime;
- int c, yes;
+ int c, yes, cr;
char *argv[2], *cp, *ep;
autoboot_tried = 1;
@@ -185,6 +185,7 @@ autoboot(int delay, char *prompt)
otime = time(NULL);
when = otime + delay; /* when to boot */
yes = 0;
+ cr = 0;
/* XXX could try to work out what we might boot */
printf("%s\n", (prompt == NULL) ? "Hit [Enter] to boot immediately, or any other key for command prompt." : prompt);
@@ -199,11 +200,14 @@ autoboot(int delay, char *prompt)
ntime = time(NULL);
if (ntime >= when) {
yes = 1;
+ if (cr)
+ putchar('\n');
break;
}
if (ntime != otime) {
printf("\rBooting [%s] in %d seconds...", getbootfile(0), (int)(when - ntime));
otime = ntime;
+ cr = 1;
}
}
if (yes) {
OpenPOWER on IntegriCloud