summaryrefslogtreecommitdiffstats
path: root/sys/boot/common
diff options
context:
space:
mode:
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