Module Name: src Committed By: drochner Date: Sun Jan 17 14:54:44 UTC 2010
Modified Files: src/sys/arch/i386/stand/boot: boot2.c src/sys/arch/i386/stand/lib: boot_params.S src/sys/arch/i386/stand/pxeboot: Makefile main.c src/sys/sys: bootblock.h src/usr.sbin/installboot/arch: i386.c Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/sys/arch/i386/stand/boot/boot2.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/i386/stand/lib/boot_params.S cvs rdiff -u -r1.18 -r1.19 src/sys/arch/i386/stand/pxeboot/Makefile cvs rdiff -u -r1.23 -r1.24 src/sys/arch/i386/stand/pxeboot/main.c cvs rdiff -u -r1.49 -r1.50 src/sys/sys/bootblock.h cvs rdiff -u -r1.35 -r1.36 src/usr.sbin/installboot/arch/i386.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/i386/stand/boot/boot2.c diff -u src/sys/arch/i386/stand/boot/boot2.c:1.46 src/sys/arch/i386/stand/boot/boot2.c:1.47 --- src/sys/arch/i386/stand/boot/boot2.c:1.46 Thu Jan 14 17:49:31 2010 +++ src/sys/arch/i386/stand/boot/boot2.c Sun Jan 17 14:54:44 2010 @@ -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); /* Index: src/sys/arch/i386/stand/lib/boot_params.S diff -u src/sys/arch/i386/stand/lib/boot_params.S:1.5 src/sys/arch/i386/stand/lib/boot_params.S:1.6 --- src/sys/arch/i386/stand/lib/boot_params.S:1.5 Thu Jan 14 17:49:31 2010 +++ src/sys/arch/i386/stand/lib/boot_params.S Sun Jan 17 14:54:44 2010 @@ -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 */ Index: src/sys/arch/i386/stand/pxeboot/Makefile diff -u src/sys/arch/i386/stand/pxeboot/Makefile:1.18 src/sys/arch/i386/stand/pxeboot/Makefile:1.19 --- src/sys/arch/i386/stand/pxeboot/Makefile:1.18 Thu Jan 14 17:49:31 2010 +++ src/sys/arch/i386/stand/pxeboot/Makefile Sun Jan 17 14:54:44 2010 @@ -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 Index: src/sys/arch/i386/stand/pxeboot/main.c diff -u src/sys/arch/i386/stand/pxeboot/main.c:1.23 src/sys/arch/i386/stand/pxeboot/main.c:1.24 --- src/sys/arch/i386/stand/pxeboot/main.c:1.23 Thu Jan 14 17:49:31 2010 +++ src/sys/arch/i386/stand/pxeboot/main.c Sun Jan 17 14:54:44 2010 @@ -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); /* Index: src/sys/sys/bootblock.h diff -u src/sys/sys/bootblock.h:1.49 src/sys/sys/bootblock.h:1.50 --- src/sys/sys/bootblock.h:1.49 Thu Jan 14 17:49:31 2010 +++ src/sys/sys/bootblock.h Sun Jan 17 14:54:43 2010 @@ -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 Index: src/usr.sbin/installboot/arch/i386.c diff -u src/usr.sbin/installboot/arch/i386.c:1.35 src/usr.sbin/installboot/arch/i386.c:1.36 --- src/usr.sbin/installboot/arch/i386.c:1.35 Thu Jan 14 17:49:32 2010 +++ src/usr.sbin/installboot/arch/i386.c Sun Jan 17 14:54:44 2010 @@ -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);