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/lib The bootinfo is refreshed each time ...



details:   https://anonhg.NetBSD.org/src/rev/47b7a25c9ba4
branches:  trunk
changeset: 815860:47b7a25c9ba4
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sun Jun 05 14:06:31 2016 +0000

description:
The bootinfo is refreshed each time the bootloader tries to execute a
kernel, so there's no point in using this global variable. Because of
this variable, only one "boot" command can be issued in the prompt, and
you have to reboot the machine if you mistyped the kernel name.

diffstat:

 sys/arch/i386/stand/lib/biosdisk.c |  13 +------------
 sys/arch/i386/stand/lib/exec.c     |   4 ++--
 2 files changed, 3 insertions(+), 14 deletions(-)

diffs (52 lines):

diff -r c9fdea34ec43 -r 47b7a25c9ba4 sys/arch/i386/stand/lib/biosdisk.c
--- a/sys/arch/i386/stand/lib/biosdisk.c        Sun Jun 05 14:00:12 2016 +0000
+++ b/sys/arch/i386/stand/lib/biosdisk.c        Sun Jun 05 14:06:31 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: biosdisk.c,v 1.44 2015/01/18 20:18:07 jakllsch Exp $   */
+/*     $NetBSD: biosdisk.c,v 1.45 2016/06/05 14:06:31 maxv Exp $       */
 
 /*
  * Copyright (c) 1996, 1998
@@ -701,24 +701,13 @@
 static void
 add_biosdisk_bootinfo(void)
 {
-       static bool done;
-
        if (bootinfo == NULL) {
-               done = false;
                return;
        }
-       
-       if (done)
-               return;
-
        BI_ADD(&bi_disk, BTINFO_BOOTDISK, sizeof(bi_disk));
        BI_ADD(&bi_wedge, BTINFO_BOOTWEDGE, sizeof(bi_wedge));
-
-       done = true;
-
        return;
 }
-
 #endif
 
 int
diff -r c9fdea34ec43 -r 47b7a25c9ba4 sys/arch/i386/stand/lib/exec.c
--- a/sys/arch/i386/stand/lib/exec.c    Sun Jun 05 14:00:12 2016 +0000
+++ b/sys/arch/i386/stand/lib/exec.c    Sun Jun 05 14:06:31 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: exec.c,v 1.59 2014/04/06 19:18:00 jakllsch Exp $        */
+/*     $NetBSD: exec.c,v 1.60 2016/06/05 14:06:31 maxv Exp $    */
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -411,7 +411,7 @@
 
 out:
        BI_FREE();
-       bootinfo = 0;
+       bootinfo = NULL;
        return -1;
 }
 



Home | Main Index | Thread Index | Old Index