diff options
author | phk <phk@FreeBSD.org> | 1996-09-11 19:53:45 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1996-09-11 19:53:45 +0000 |
commit | 5c73cf79b9ada3b134cd4f6596bab80a44095809 (patch) | |
tree | d5257995f3b81705516e8902b3983222ab017637 | |
parent | a04f5409f43330b7bca05bbbf1cb3a041b7c1e26 (diff) | |
download | FreeBSD-src-5c73cf79b9ada3b134cd4f6596bab80a44095809.zip FreeBSD-src-5c73cf79b9ada3b134cd4f6596bab80a44095809.tar.gz |
Make userconfig two (default: on) options:
USERCONFIG to enable
VISUAL_USERCONFIG to get the gui stuff too.
Requested by: pst
-rw-r--r-- | sys/amd64/amd64/machdep.c | 7 | ||||
-rw-r--r-- | sys/amd64/conf/GENERIC | 4 | ||||
-rw-r--r-- | sys/conf/NOTES | 5 | ||||
-rw-r--r-- | sys/conf/files.i386 | 4 | ||||
-rw-r--r-- | sys/conf/options.i386 | 5 | ||||
-rw-r--r-- | sys/i386/conf/GENERIC | 4 | ||||
-rw-r--r-- | sys/i386/conf/LINT | 5 | ||||
-rw-r--r-- | sys/i386/conf/NOTES | 5 | ||||
-rw-r--r-- | sys/i386/conf/files.i386 | 4 | ||||
-rw-r--r-- | sys/i386/conf/options.i386 | 5 | ||||
-rw-r--r-- | sys/i386/i386/machdep.c | 7 | ||||
-rw-r--r-- | sys/i386/i386/userconfig.c | 13 |
12 files changed, 52 insertions, 16 deletions
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index abc6d0e..58c9cf7 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.202 1996/09/06 23:07:03 phk Exp $ + * $Id: machdep.c,v 1.203 1996/09/10 23:06:58 bde Exp $ */ #include "npx.h" @@ -44,6 +44,7 @@ #include "opt_bounce.h" #include "opt_machdep.h" #include "opt_perfmon.h" +#include "opt_userconfig.h" #include <sys/param.h> #include <sys/systm.h> @@ -380,8 +381,12 @@ again: callout[i-1].c_next = &callout[i]; if (boothowto & RB_CONFIG) { +#ifdef USERCONFIG userconfig(); cninit(); /* the preferred console may have changed */ +#else + printf("Sorry! no userconfig in this kernel\n"); +#endif } #ifdef BOUNCE_BUFFERS diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC index f8c6a98..88327db 100644 --- a/sys/amd64/conf/GENERIC +++ b/sys/amd64/conf/GENERIC @@ -11,7 +11,7 @@ # device lines is present in the ./LINT configuration file. If you are # in doubt as to the purpose or necessity of a line, check first in LINT. # -# $Id: GENERIC,v 1.74 1996/07/11 11:18:45 jkh Exp $ +# $Id: GENERIC,v 1.75 1996/08/27 16:25:53 wosch Exp $ machine "i386" cpu "I386_CPU" @@ -33,6 +33,8 @@ options SCSI_DELAY=15 #Be pessimistic about Joe SCSI device options BOUNCE_BUFFERS #include support for DMA bounce buffers options UCONSOLE #Allow users to grab the console options FAILSAFE #Be conservative +options USERCONFIG #boot -c editor +options VISUAL_USERCONFIG #visual boot -c editor config kernel root on wd0 diff --git a/sys/conf/NOTES b/sys/conf/NOTES index 343e4f3..168ff1f 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -2,7 +2,7 @@ # LINT -- config file for checking all the sources, tries to pull in # as much of the source tree as it can. # -# $Id: LINT,v 1.276 1996/09/06 23:35:45 pst Exp $ +# $Id: LINT,v 1.277 1996/09/10 21:38:45 bde Exp $ # # NB: You probably don't want to try running a kernel built from this # file. Instead, you should start from GENERIC, and add options from @@ -155,6 +155,9 @@ options PERFMON # Allow ordinary users to take the console - this is useful for X. options UCONSOLE +# XXX - this doesn't belong here either +options USERCONFIG #boot -c editor +options VISUAL_USERCONFIG #visual boot -c editor ##################################################################### # NETWORKING OPTIONS diff --git a/sys/conf/files.i386 b/sys/conf/files.i386 index 090296c..67afe44 100644 --- a/sys/conf/files.i386 +++ b/sys/conf/files.i386 @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $Id: files.i386,v 1.138 1996/07/08 19:44:30 wollman Exp $ +# $Id: files.i386,v 1.139 1996/08/27 19:45:54 pst Exp $ # aic7xxx_asm optional ahc device-driver \ dependency "$S/dev/aic7xxx/aic7xxx_asm.c" \ @@ -58,7 +58,7 @@ i386/i386/support.s standard i386/i386/swtch.s standard i386/i386/sys_machdep.c standard i386/i386/trap.c standard -i386/i386/userconfig.c standard +i386/i386/userconfig.c optional userconfig i386/i386/vm_machdep.c standard i386/ibcs2/ibcs2_fcntl.c optional ibcs2 i386/ibcs2/ibcs2_stat.c optional ibcs2 diff --git a/sys/conf/options.i386 b/sys/conf/options.i386 index 1183717..f6d5251 100644 --- a/sys/conf/options.i386 +++ b/sys/conf/options.i386 @@ -1,4 +1,4 @@ -# $Id: options.i386,v 1.16 1996/09/10 21:38:47 bde Exp $ +# $Id: options.i386,v 1.17 1996/09/10 23:07:04 bde Exp $ BOUNCEPAGES opt_bounce.h USER_LDT MATH_EMULATE opt_math_emulate.h @@ -34,3 +34,6 @@ XT_KEYBOARD opt_syscons.h ATAPI opt_atapi.h ATAPI_STATIC opt_atapi.h + +USERCONFIG opt_userconfig.h +VISUAL_USERCONFIG opt_userconfig.h diff --git a/sys/i386/conf/GENERIC b/sys/i386/conf/GENERIC index f8c6a98..88327db 100644 --- a/sys/i386/conf/GENERIC +++ b/sys/i386/conf/GENERIC @@ -11,7 +11,7 @@ # device lines is present in the ./LINT configuration file. If you are # in doubt as to the purpose or necessity of a line, check first in LINT. # -# $Id: GENERIC,v 1.74 1996/07/11 11:18:45 jkh Exp $ +# $Id: GENERIC,v 1.75 1996/08/27 16:25:53 wosch Exp $ machine "i386" cpu "I386_CPU" @@ -33,6 +33,8 @@ options SCSI_DELAY=15 #Be pessimistic about Joe SCSI device options BOUNCE_BUFFERS #include support for DMA bounce buffers options UCONSOLE #Allow users to grab the console options FAILSAFE #Be conservative +options USERCONFIG #boot -c editor +options VISUAL_USERCONFIG #visual boot -c editor config kernel root on wd0 diff --git a/sys/i386/conf/LINT b/sys/i386/conf/LINT index 343e4f3..168ff1f 100644 --- a/sys/i386/conf/LINT +++ b/sys/i386/conf/LINT @@ -2,7 +2,7 @@ # LINT -- config file for checking all the sources, tries to pull in # as much of the source tree as it can. # -# $Id: LINT,v 1.276 1996/09/06 23:35:45 pst Exp $ +# $Id: LINT,v 1.277 1996/09/10 21:38:45 bde Exp $ # # NB: You probably don't want to try running a kernel built from this # file. Instead, you should start from GENERIC, and add options from @@ -155,6 +155,9 @@ options PERFMON # Allow ordinary users to take the console - this is useful for X. options UCONSOLE +# XXX - this doesn't belong here either +options USERCONFIG #boot -c editor +options VISUAL_USERCONFIG #visual boot -c editor ##################################################################### # NETWORKING OPTIONS diff --git a/sys/i386/conf/NOTES b/sys/i386/conf/NOTES index 343e4f3..168ff1f 100644 --- a/sys/i386/conf/NOTES +++ b/sys/i386/conf/NOTES @@ -2,7 +2,7 @@ # LINT -- config file for checking all the sources, tries to pull in # as much of the source tree as it can. # -# $Id: LINT,v 1.276 1996/09/06 23:35:45 pst Exp $ +# $Id: LINT,v 1.277 1996/09/10 21:38:45 bde Exp $ # # NB: You probably don't want to try running a kernel built from this # file. Instead, you should start from GENERIC, and add options from @@ -155,6 +155,9 @@ options PERFMON # Allow ordinary users to take the console - this is useful for X. options UCONSOLE +# XXX - this doesn't belong here either +options USERCONFIG #boot -c editor +options VISUAL_USERCONFIG #visual boot -c editor ##################################################################### # NETWORKING OPTIONS diff --git a/sys/i386/conf/files.i386 b/sys/i386/conf/files.i386 index 090296c..67afe44 100644 --- a/sys/i386/conf/files.i386 +++ b/sys/i386/conf/files.i386 @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $Id: files.i386,v 1.138 1996/07/08 19:44:30 wollman Exp $ +# $Id: files.i386,v 1.139 1996/08/27 19:45:54 pst Exp $ # aic7xxx_asm optional ahc device-driver \ dependency "$S/dev/aic7xxx/aic7xxx_asm.c" \ @@ -58,7 +58,7 @@ i386/i386/support.s standard i386/i386/swtch.s standard i386/i386/sys_machdep.c standard i386/i386/trap.c standard -i386/i386/userconfig.c standard +i386/i386/userconfig.c optional userconfig i386/i386/vm_machdep.c standard i386/ibcs2/ibcs2_fcntl.c optional ibcs2 i386/ibcs2/ibcs2_stat.c optional ibcs2 diff --git a/sys/i386/conf/options.i386 b/sys/i386/conf/options.i386 index 1183717..f6d5251 100644 --- a/sys/i386/conf/options.i386 +++ b/sys/i386/conf/options.i386 @@ -1,4 +1,4 @@ -# $Id: options.i386,v 1.16 1996/09/10 21:38:47 bde Exp $ +# $Id: options.i386,v 1.17 1996/09/10 23:07:04 bde Exp $ BOUNCEPAGES opt_bounce.h USER_LDT MATH_EMULATE opt_math_emulate.h @@ -34,3 +34,6 @@ XT_KEYBOARD opt_syscons.h ATAPI opt_atapi.h ATAPI_STATIC opt_atapi.h + +USERCONFIG opt_userconfig.h +VISUAL_USERCONFIG opt_userconfig.h diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index abc6d0e..58c9cf7 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.202 1996/09/06 23:07:03 phk Exp $ + * $Id: machdep.c,v 1.203 1996/09/10 23:06:58 bde Exp $ */ #include "npx.h" @@ -44,6 +44,7 @@ #include "opt_bounce.h" #include "opt_machdep.h" #include "opt_perfmon.h" +#include "opt_userconfig.h" #include <sys/param.h> #include <sys/systm.h> @@ -380,8 +381,12 @@ again: callout[i-1].c_next = &callout[i]; if (boothowto & RB_CONFIG) { +#ifdef USERCONFIG userconfig(); cninit(); /* the preferred console may have changed */ +#else + printf("Sorry! no userconfig in this kernel\n"); +#endif } #ifdef BOUNCE_BUFFERS diff --git a/sys/i386/i386/userconfig.c b/sys/i386/i386/userconfig.c index acd4e7a..0d7cdfa 100644 --- a/sys/i386/i386/userconfig.c +++ b/sys/i386/i386/userconfig.c @@ -46,7 +46,7 @@ ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ** - ** $Id: userconfig.c,v 1.42 1996/04/13 18:33:04 bde Exp $ + ** $Id: userconfig.c,v 1.43 1996/08/10 22:06:09 joerg Exp $ **/ /** @@ -118,10 +118,14 @@ #include <pci/pcivar.h> +#include <opt_userconfig.h> + +static struct isa_device *isa_devlist; /* list read by dset to extract changes */ + +#ifdef VISUAL_USERCONFIG static struct isa_device *devtabs[] = { isa_devtab_bio, isa_devtab_tty, isa_devtab_net, isa_devtab_null, NULL }; -static struct isa_device *isa_devlist; /* list read by dset to extract changes */ #define putchar(x) cnputc(x) #define getchar() cngetc() @@ -2109,6 +2113,7 @@ visuserconfig(void) } } +#endif /* VISUAL_USERCONFIG */ /* * Copyright (c) 1991 Regents of the University of California. * All rights reserved. @@ -2151,7 +2156,7 @@ visuserconfig(void) * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: userconfig.c,v 1.42 1996/04/13 18:33:04 bde Exp $ + * $Id: userconfig.c,v 1.43 1996/08/10 22:06:09 joerg Exp $ */ #include "scbus.h" @@ -2243,7 +2248,9 @@ static Cmd CmdList[] = { #if NSCBUS > 0 { "s", list_scsi, NULL }, /* scsi */ #endif +#ifdef VISUAL_USERCONFIG { "v", (CmdFunc)visuserconfig, NULL }, /* visual mode */ +#endif { NULL, NULL, NULL }, }; |