Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/i386/stand/boot - It is worthless to endlessly try ...



details:   https://anonhg.NetBSD.org/src/rev/b7b91dcbbe22
branches:  trunk
changeset: 582226:b7b91dcbbe22
user:      junyoung <junyoung%NetBSD.org@localhost>
date:      Tue Jun 21 14:20:35 2005 +0000

description:
- It is worthless to endlessly try to boot unbootable images. If all predefined
  boot images are failed to boot, fall into the prompt.
- Fix a garbage in previous commit.

diffstat:

 sys/arch/i386/stand/boot/boot2.c |  11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diffs (40 lines):

diff -r b9aa6b723b4c -r b7b91dcbbe22 sys/arch/i386/stand/boot/boot2.c
--- a/sys/arch/i386/stand/boot/boot2.c  Tue Jun 21 14:16:27 2005 +0000
+++ b/sys/arch/i386/stand/boot/boot2.c  Tue Jun 21 14:20:35 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: boot2.c,v 1.9 2005/06/21 14:16:27 junyoung Exp $       */
+/*     $NetBSD: boot2.c,v 1.10 2005/06/21 14:20:35 junyoung Exp $      */
 
 /*
  * Copyright (c) 2003
@@ -239,8 +239,7 @@
        default_filename = DEFFILENAME;
 
        printf("Press return to boot now, any other key for boot menu\n");
-       currname = 0;
-       for (;;) {
+       for (currname = 0; currname < NUMNAMES; currname++) {
                printf("booting %s - starting in ",
                       sprint_bootsel(names[currname][0]));
 
@@ -259,9 +258,9 @@
                bootit(names[currname][0], 0, 0);
                /* since it failed, try compressed bootfile. */
                bootit(names[currname][1], 0, 1);
-               /* since it failed, try switching bootfile. */
-               currname = (currname + 1) % NUMNAMES;
        }
+
+       bootmenu();     /* does not return */
 }
 
 /* ARGSUSED */
@@ -325,7 +324,7 @@
                return;
        }
 
-       if (!strchr(arg, ':') != NULL ||
+       if (strchr(arg, ':') != NULL ||
            parsebootfile(arg, &fsname, &devname, &default_unit,
                          &default_partition, &file)) {
                command_help(NULL);



Home | Main Index | Thread Index | Old Index