diff options
author | brian <brian@FreeBSD.org> | 1999-05-28 08:01:52 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1999-05-28 08:01:52 +0000 |
commit | 03b6a6f1747185b2355ac8494c313206231e2683 (patch) | |
tree | deb90d671b909f66d5d841208dcdd4c7985299f7 | |
parent | a9b474952dfd8e972b4082fd100c82c4d661185f (diff) | |
download | FreeBSD-src-03b6a6f1747185b2355ac8494c313206231e2683.zip FreeBSD-src-03b6a6f1747185b2355ac8494c313206231e2683.tar.gz |
Always output a linefeed when we've decided whether to boot
or display a loader prompt; either we've said
"Booting [%s]..." or we've received a non-line-feed character
and need a '\n' anyway.
-rw-r--r-- | sys/boot/common/boot.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/boot/common/boot.c b/sys/boot/common/boot.c index 2de8603..e8a7fc8 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.9 1998/10/31 17:12:32 dfr Exp $ + * $Id: boot.c,v 1.10 1998/11/02 16:55:57 msmith Exp $ */ /* @@ -166,7 +166,7 @@ int autoboot(int delay, char *prompt) { time_t when, otime, ntime; - int c, yes, cr; + int c, yes; char *argv[2], *cp, *ep; autoboot_tried = 1; @@ -185,7 +185,6 @@ 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); @@ -205,13 +204,11 @@ autoboot(int delay, char *prompt) if (ntime != otime) { printf("\rBooting [%s] in %d seconds... ", getbootfile(0), (int)(when - ntime)); otime = ntime; - cr = 1; } } if (yes) printf("\rBooting [%s]... ", getbootfile(0)); - if (cr) - putchar('\n'); + putchar('\n'); if (yes) { argv[0] = "boot"; argv[1] = NULL; |