Source-Changes-HG archive

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

[src/netbsd-7]: src/usr.sbin/sysinst/arch/i386 Pull up following revision(s) ...



details:   https://anonhg.NetBSD.org/src/rev/b53f8772b072
branches:  netbsd-7
changeset: 798989:b53f8772b072
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Feb 16 13:52:43 2015 +0000

description:
Pull up following revision(s) (requested by snj in ticket #518):
        usr.sbin/sysinst/arch/i386/md.c: revision 1.4
When checking if the user chose to use the existing bootblocks, use
the appropriate variable, boottype.bp_consdev, not the uninitialized
bp.bp_consdev.  Also remove bp and bootxx since their only use was in
the incorrect check.  This should fix the problem of sysinst segfaulting
when you choose "Use existing bootblocks" on amd64.

diffstat:

 usr.sbin/sysinst/arch/i386/md.c |  7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diffs (35 lines):

diff -r a57192203fde -r b53f8772b072 usr.sbin/sysinst/arch/i386/md.c
--- a/usr.sbin/sysinst/arch/i386/md.c   Mon Feb 16 12:48:32 2015 +0000
+++ b/usr.sbin/sysinst/arch/i386/md.c   Mon Feb 16 13:52:43 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.3.2.1 2015/01/11 04:32:38 snj Exp $ */
+/*     $NetBSD: md.c,v 1.3.2.2 2015/02/16 13:52:43 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -298,7 +298,6 @@
 {
        int ret;
        size_t len;
-       char bootxx[8192 + 4];
        char boot_options[1024];
        char *bootxx_filename;
        /*
@@ -321,7 +320,6 @@
        static int conmib[] = {CTL_MACHDEP, CPU_CONSDEV};
        struct termios t;
        dev_t condev;
-#define bp (*(struct x86_boot_params *)(bootxx + 512 * 2 + 8))
 
        /*
         * Get console device, should either be ttyE0 or tty0n.
@@ -339,7 +337,8 @@
 
        process_menu(MENU_getboottype, &boottype);
        msg_display(MSG_dobootblks, pm->diskdev);
-       if (bp.bp_consdev == ~0u)
+       if (boottype.bp_consdev == ~0u)
+               /* Use existing bootblocks */
                return 0;
 
        ret = cp_to_target("/usr/mdec/boot", "/boot");



Home | Main Index | Thread Index | Old Index