Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/vax/boot/boot Use loadfile with boot commands, not ...



details:   https://anonhg.NetBSD.org/src/rev/cb2e26e4738b
branches:  trunk
changeset: 509344:cb2e26e4738b
user:      matt <matt%NetBSD.org@localhost>
date:      Wed May 02 06:56:54 2001 +0000

description:
Use loadfile with boot commands, not exec.

diffstat:

 sys/arch/vax/boot/boot/boot.c |  15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diffs (36 lines):

diff -r 83bdb5df53ad -r cb2e26e4738b sys/arch/vax/boot/boot/boot.c
--- a/sys/arch/vax/boot/boot/boot.c     Wed May 02 06:56:29 2001 +0000
+++ b/sys/arch/vax/boot/boot/boot.c     Wed May 02 06:56:54 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: boot.c,v 1.15 2000/11/01 14:04:28 ragge Exp $ */
+/*     $NetBSD: boot.c,v 1.16 2001/05/02 06:56:54 matt Exp $ */
 /*-
  * Copyright (c) 1982, 1986 The Regents of the University of California.
  * All rights reserved.
@@ -199,7 +199,8 @@
 boot(char *arg)
 {
        char *fn = "netbsd";
-       int howto, fl;
+       int howto, fl, err;
+       u_long marks[MARK_MAX];
 
        if (arg) {
                while (*arg == ' ')
@@ -229,7 +230,15 @@
                }
                bootrpb.rpb_bootr5 = howto;
        }
-load:  exec(fn, 0, 0);
+load:  
+       marks[MARK_START] = 0;
+       err = loadfile(fn, marks, LOAD_KERNEL|COUNT_KERNEL);
+       if (err == 0) {
+               machdep_start((char *)marks[MARK_ENTRY], 0,
+                             (void *)marks[MARK_START],
+                             (void *)marks[MARK_SYM],
+                             (void *)marks[MARK_END]);
+       }
        printf("Boot failed: %s\n", strerror(errno));
 }
 



Home | Main Index | Thread Index | Old Index