Source-Changes-HG archive

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

[src/trunk]: src Invert the flag bits to control module loading: rename



details:   https://anonhg.NetBSD.org/src/rev/d5581743f58c
branches:  trunk
changeset: 750866:d5581743f58c
user:      drochner <drochner%NetBSD.org@localhost>
date:      Sun Jan 17 14:54:43 2010 +0000

description:
Invert the flag bits to control module loading: rename
LOADMODULES->NOMODULES and READBOOTCONF->NOBOOTCONF.
This way, the default value (0) wired into old bootxx_* and installed
to file systems remains valid and we avoid problems on partial updates.

diffstat:

 sys/arch/i386/stand/boot/boot2.c      |  8 ++++----
 sys/arch/i386/stand/lib/boot_params.S |  4 ++--
 sys/arch/i386/stand/pxeboot/Makefile  |  4 ++--
 sys/arch/i386/stand/pxeboot/main.c    |  8 ++++----
 sys/sys/bootblock.h                   |  6 +++---
 usr.sbin/installboot/arch/i386.c      |  8 ++++----
 6 files changed, 19 insertions(+), 19 deletions(-)

diffs (138 lines):

diff -r fab6d060d7ac -r d5581743f58c sys/arch/i386/stand/boot/boot2.c
--- a/sys/arch/i386/stand/boot/boot2.c  Sun Jan 17 13:35:00 2010 +0000
+++ b/sys/arch/i386/stand/boot/boot2.c  Sun Jan 17 14:54:43 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: boot2.c,v 1.46 2010/01/14 17:49:31 drochner Exp $      */
+/*     $NetBSD: boot2.c,v 1.47 2010/01/17 14:54:44 drochner Exp $      */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -291,8 +291,8 @@
 #endif
        gateA20();
 
-       boot_modules_enabled = !!(boot_params.bp_flags
-                                 & X86_BP_FLAGS_LOADMODULES);
+       boot_modules_enabled = !(boot_params.bp_flags
+                                & X86_BP_FLAGS_NOMODULES);
        if (boot_params.bp_flags & X86_BP_FLAGS_RESET_VIDEO)
                biosvideomode();
 
@@ -310,7 +310,7 @@
        default_filename = DEFFILENAME;
 
 #ifndef SMALL
-       if (boot_params.bp_flags & X86_BP_FLAGS_READBOOTCONF)
+       if (!(boot_params.bp_flags & X86_BP_FLAGS_NOBOOTCONF))
                parsebootconf(BOOTCONF);
 
        /*
diff -r fab6d060d7ac -r d5581743f58c sys/arch/i386/stand/lib/boot_params.S
--- a/sys/arch/i386/stand/lib/boot_params.S     Sun Jan 17 13:35:00 2010 +0000
+++ b/sys/arch/i386/stand/lib/boot_params.S     Sun Jan 17 14:54:43 2010 +0000
@@ -1,11 +1,11 @@
-/*     $NetBSD: boot_params.S,v 1.5 2010/01/14 17:49:31 drochner Exp $ */
+/*     $NetBSD: boot_params.S,v 1.6 2010/01/17 14:54:44 drochner Exp $ */
 
 /* Default boot parameters - must match struct x86_boot_params in bootblock.h */
 
 #ifdef BOOTPARAM_DEFFLAGS
        .long   BOOTPARAM_DEFFLAGS
 #else
-       .long   0x0c                    /* flags: bootconf+modules */
+       .long   0x0
 #endif
        .long   5                       /* timeout in seconds */
        .long   0                       /* console device 0 => CONSDEV_PC */
diff -r fab6d060d7ac -r d5581743f58c sys/arch/i386/stand/pxeboot/Makefile
--- a/sys/arch/i386/stand/pxeboot/Makefile      Sun Jan 17 13:35:00 2010 +0000
+++ b/sys/arch/i386/stand/pxeboot/Makefile      Sun Jan 17 14:54:43 2010 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.18 2010/01/14 17:49:31 drochner Exp $
+#      $NetBSD: Makefile,v 1.19 2010/01/17 14:54:44 drochner Exp $
 
 S=     ${.CURDIR}/../../../..
 
@@ -65,7 +65,7 @@
 
 # modules and boot.cfg need special DHCP server setup, disable
 # per default for compatibility with existing setups
-CPPFLAGS+= -DBOOTPARAM_DEFFLAGS=0
+CPPFLAGS+= -DBOOTPARAM_DEFFLAGS=0xc0
 
 #CFLAGS= -O2 -fomit-frame-pointer -fno-defer-pop
 CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-main
diff -r fab6d060d7ac -r d5581743f58c sys/arch/i386/stand/pxeboot/main.c
--- a/sys/arch/i386/stand/pxeboot/main.c        Sun Jan 17 13:35:00 2010 +0000
+++ b/sys/arch/i386/stand/pxeboot/main.c        Sun Jan 17 14:54:43 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.23 2010/01/14 17:49:31 drochner Exp $       */
+/*     $NetBSD: main.c,v 1.24 2010/01/17 14:54:44 drochner Exp $       */
 
 /*
  * Copyright (c) 1996
@@ -130,11 +130,11 @@
        initio(CONSDEV_PC);
 #endif
        gateA20();
-       boot_modules_enabled = !!(boot_params.bp_flags
-                                 & X86_BP_FLAGS_LOADMODULES);
+       boot_modules_enabled = !(boot_params.bp_flags
+                                & X86_BP_FLAGS_NOMODULES);
 
 #ifndef SMALL
-       if (boot_params.bp_flags & X86_BP_FLAGS_READBOOTCONF)
+       if (!(boot_params.bp_flags & X86_BP_FLAGS_NOBOOTCONF))
                parsebootconf(BOOTCONF);
 
        /*
diff -r fab6d060d7ac -r d5581743f58c sys/sys/bootblock.h
--- a/sys/sys/bootblock.h       Sun Jan 17 13:35:00 2010 +0000
+++ b/sys/sys/bootblock.h       Sun Jan 17 14:54:43 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bootblock.h,v 1.49 2010/01/14 17:49:31 drochner Exp $  */
+/*     $NetBSD: bootblock.h,v 1.50 2010/01/17 14:54:43 drochner Exp $  */
 
 /*-
  * Copyright (c) 2002-2004 The NetBSD Foundation, Inc.
@@ -1068,8 +1068,8 @@
                /* values for bp_flags */
 #define        X86_BP_FLAGS_RESET_VIDEO        1
 #define        X86_BP_FLAGS_PASSWORD           2
-#define        X86_BP_FLAGS_LOADMODULES        4
-#define        X86_BP_FLAGS_READBOOTCONF       8
+#define        X86_BP_FLAGS_NOMODULES          4
+#define        X86_BP_FLAGS_NOBOOTCONF         8
 
                /* values for bp_consdev */
 #define        X86_BP_CONSDEV_PC       0
diff -r fab6d060d7ac -r d5581743f58c usr.sbin/installboot/arch/i386.c
--- a/usr.sbin/installboot/arch/i386.c  Sun Jan 17 13:35:00 2010 +0000
+++ b/usr.sbin/installboot/arch/i386.c  Sun Jan 17 14:54:43 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i386.c,v 1.35 2010/01/14 17:49:32 drochner Exp $ */
+/* $NetBSD: i386.c,v 1.36 2010/01/17 14:54:44 drochner Exp $ */
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 
 #include <sys/cdefs.h>
 #if !defined(__lint)
-__RCSID("$NetBSD: i386.c,v 1.35 2010/01/14 17:49:32 drochner Exp $");
+__RCSID("$NetBSD: i386.c,v 1.36 2010/01/17 14:54:44 drochner Exp $");
 #endif /* !__lint */
 
 #include <sys/param.h>
@@ -275,9 +275,9 @@
        if (params->flags & IB_KEYMAP)
                strlcpy(bp.bp_keymap, params->keymap, sizeof bp.bp_keymap);
        if (params->flags & IB_MODULES)
-               bp.bp_flags ^= htole32(X86_BP_FLAGS_LOADMODULES);
+               bp.bp_flags ^= htole32(X86_BP_FLAGS_NOMODULES);
        if (params->flags & IB_BOOTCONF)
-               bp.bp_flags ^= htole32(X86_BP_FLAGS_READBOOTCONF);
+               bp.bp_flags ^= htole32(X86_BP_FLAGS_NOBOOTCONF);
 
        if (params->flags & (IB_NOWRITE | IB_VERBOSE))
                show_i386_boot_params(&bp);



Home | Main Index | Thread Index | Old Index