diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2008-03-23 17:05:43 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2008-03-23 17:05:43 +0000 |
commit | 18aeccd206e6581339dd7d7a6200670cf222cc35 (patch) | |
tree | 6cf1f0033959ffcb6492a3939dae5a0635d4f0b4 /sys | |
parent | 9e95a4dd7a4a29af2d5d1c32a8192d1f8bc8e93e (diff) |
setroot() is supposed to be safe in all cases, so kill the special cases
for RB_DFLTROOT; ok miod
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/arm/arm/arm32_machdep.c | 11 | ||||
-rw-r--r-- | sys/arch/armish/armish/armish_machdep.c | 6 | ||||
-rw-r--r-- | sys/arch/landisk/landisk/machdep.c | 6 | ||||
-rw-r--r-- | sys/arch/macppc/macppc/machdep.c | 8 | ||||
-rw-r--r-- | sys/arch/mvme68k/stand/libsa/parse_args.c | 3 | ||||
-rw-r--r-- | sys/arch/mvme88k/stand/libsa/parse_args.c | 3 | ||||
-rw-r--r-- | sys/arch/mvmeppc/stand/libsa/parse_args.c | 3 | ||||
-rw-r--r-- | sys/arch/sgi/sgi/machdep.c | 8 | ||||
-rw-r--r-- | sys/arch/solbourne/solbourne/autoconf.c | 6 | ||||
-rw-r--r-- | sys/arch/sparc/sparc/autoconf.c | 6 | ||||
-rw-r--r-- | sys/arch/zaurus/zaurus/zaurus_machdep.c | 5 | ||||
-rw-r--r-- | sys/kern/subr_disk.c | 5 |
12 files changed, 12 insertions, 58 deletions
diff --git a/sys/arch/arm/arm/arm32_machdep.c b/sys/arch/arm/arm/arm32_machdep.c index 14101e786e6..ddb653e6ec9 100644 --- a/sys/arch/arm/arm/arm32_machdep.c +++ b/sys/arch/arm/arm/arm32_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: arm32_machdep.c,v 1.27 2007/05/30 17:13:29 miod Exp $ */ +/* $OpenBSD: arm32_machdep.c,v 1.28 2008/03/23 17:05:41 deraadt Exp $ */ /* $NetBSD: arm32_machdep.c,v 1.42 2003/12/30 12:33:15 pk Exp $ */ /* @@ -280,15 +280,6 @@ cpu_startup() initmsgbuf(msgbufaddr, round_page(MSGBUFSIZE)); /* - * Look at arguments passed to us and compute boothowto. - * Default to SINGLE and ASKNAME if no args or - * SINGLE and DFLTROOT if this is a ramdisk kernel. - */ -#ifdef RAMDISK_HOOKS - boothowto = RB_SINGLE | RB_DFLTROOT; -#endif /* RAMDISK_HOOKS */ - - /* * Identify ourselves for the msgbuf (everything printed earlier will * not be buffered). */ diff --git a/sys/arch/armish/armish/armish_machdep.c b/sys/arch/armish/armish/armish_machdep.c index b4080e936f4..78e7b89534e 100644 --- a/sys/arch/armish/armish/armish_machdep.c +++ b/sys/arch/armish/armish/armish_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: armish_machdep.c,v 1.10 2007/05/19 15:49:05 miod Exp $ */ +/* $OpenBSD: armish_machdep.c,v 1.11 2008/03/23 17:05:41 deraadt Exp $ */ /* $NetBSD: lubbock_machdep.c,v 1.2 2003/07/15 00:25:06 lukem Exp $ */ /* @@ -371,10 +371,6 @@ initarm(void *arg) /* XXX should really be done after setting up the console, but we * XXX need to parse the console selection flags right now. */ process_kernel_args((char *)0xa0200000 - MAX_BOOT_STRING - 1); -#ifdef RAMDISK_HOOKS - boothowto |= RB_DFLTROOT; -#endif /* RAMDISK_HOOKS */ - /* Calibrate the delay loop. */ #if 1 diff --git a/sys/arch/landisk/landisk/machdep.c b/sys/arch/landisk/landisk/machdep.c index b16721fce55..b5a03b19cc0 100644 --- a/sys/arch/landisk/landisk/machdep.c +++ b/sys/arch/landisk/landisk/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.13 2007/06/06 17:15:12 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.14 2008/03/23 17:05:41 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.1 2006/09/01 21:26:18 uwe Exp $ */ /*- @@ -170,10 +170,6 @@ landisk_startup(int howto, char *_esym) /* Initialize pmap and start to address translation */ pmap_bootstrap(); -#ifdef RAMDISK_HOOKS - boothowto |= RB_DFLTROOT; -#endif /* RAMDISK_HOOKS */ - #if defined(DDB) db_machine_init(); ddb_init(); diff --git a/sys/arch/macppc/macppc/machdep.c b/sys/arch/macppc/macppc/machdep.c index 042b585a223..59fb7d45616 100644 --- a/sys/arch/macppc/macppc/machdep.c +++ b/sys/arch/macppc/macppc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.94 2007/11/04 13:43:38 martin Exp $ */ +/* $OpenBSD: machdep.c,v 1.95 2008/03/23 17:05:41 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */ /* @@ -348,14 +348,8 @@ initppc(startkernel, endkernel, args) /* * Look at arguments passed to us and compute boothowto. - * Default to SINGLE and ASKNAME if no args or - * SINGLE and DFLTROOT if this is a ramdisk kernel. */ -#ifdef RAMDISK_HOOKS - boothowto = RB_SINGLE | RB_DFLTROOT; -#else boothowto = RB_AUTOBOOT; -#endif /* RAMDISK_HOOKS */ /* * Parse arg string. diff --git a/sys/arch/mvme68k/stand/libsa/parse_args.c b/sys/arch/mvme68k/stand/libsa/parse_args.c index 180000a131a..8af53693eb6 100644 --- a/sys/arch/mvme68k/stand/libsa/parse_args.c +++ b/sys/arch/mvme68k/stand/libsa/parse_args.c @@ -1,4 +1,4 @@ -/* $OpenBSD: parse_args.c,v 1.6 2003/08/20 00:25:34 deraadt Exp $ */ +/* $OpenBSD: parse_args.c,v 1.7 2008/03/23 17:05:41 deraadt Exp $ */ /*- * Copyright (c) 1995 Theo de Raadt @@ -46,7 +46,6 @@ struct flags { { 'y', RB_NOSYM }, { 'd', RB_KDB }, { 'm', RB_MINIROOT }, - { 'r', RB_DFLTROOT }, { 's', RB_SINGLE }, }; diff --git a/sys/arch/mvme88k/stand/libsa/parse_args.c b/sys/arch/mvme88k/stand/libsa/parse_args.c index 3bbe717a863..31db44136b2 100644 --- a/sys/arch/mvme88k/stand/libsa/parse_args.c +++ b/sys/arch/mvme88k/stand/libsa/parse_args.c @@ -1,4 +1,4 @@ -/* $OpenBSD: parse_args.c,v 1.5 2006/05/16 22:52:09 miod Exp $ */ +/* $OpenBSD: parse_args.c,v 1.6 2008/03/23 17:05:41 deraadt Exp $ */ /*- * Copyright (c) 1995 Theo de Raadt @@ -45,7 +45,6 @@ struct flags { { 'c', RB_CONFIG }, { 'd', RB_KDB }, { 'm', RB_MINIROOT }, - { 'r', RB_DFLTROOT }, { 's', RB_SINGLE }, { 'y', RB_NOSYM }, }; diff --git a/sys/arch/mvmeppc/stand/libsa/parse_args.c b/sys/arch/mvmeppc/stand/libsa/parse_args.c index 7b7089cade7..b72bc323234 100644 --- a/sys/arch/mvmeppc/stand/libsa/parse_args.c +++ b/sys/arch/mvmeppc/stand/libsa/parse_args.c @@ -1,4 +1,4 @@ -/* $OpenBSD: parse_args.c,v 1.3 2004/01/24 21:12:22 miod Exp $ */ +/* $OpenBSD: parse_args.c,v 1.4 2008/03/23 17:05:41 deraadt Exp $ */ /*- * Copyright (c) 1995 Theo de Raadt @@ -45,7 +45,6 @@ struct flags { { 'c', RB_CONFIG }, { 'd', RB_KDB }, { 'm', RB_MINIROOT }, - { 'r', RB_DFLTROOT }, { 's', RB_SINGLE }, { 'y', RB_NOSYM }, }; diff --git a/sys/arch/sgi/sgi/machdep.c b/sys/arch/sgi/sgi/machdep.c index d01d2925fbe..a0b15e7c7f6 100644 --- a/sys/arch/sgi/sgi/machdep.c +++ b/sys/arch/sgi/sgi/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.54 2008/02/20 19:13:38 miod Exp $ */ +/* $OpenBSD: machdep.c,v 1.55 2008/03/23 17:05:41 deraadt Exp $ */ /* * Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -343,14 +343,8 @@ bios_printf("SR=%08x\n", getsr()); /* leave this in for now. need to see sr */ /* * Look at arguments passed to us and compute boothowto. - * Default to AUTOBOOT if no args or SINGLE and DFLTROOT - * if this is a ramdisk kernel. */ -#ifdef RAMDISK_HOOKS - boothowto = RB_SINGLE | RB_DFLTROOT; -#else boothowto = RB_AUTOBOOT; -#endif /* RAMDISK_HOOKS */ dobootopts(argc, argv); diff --git a/sys/arch/solbourne/solbourne/autoconf.c b/sys/arch/solbourne/solbourne/autoconf.c index a77b07b3c6d..eda9abd4fc5 100644 --- a/sys/arch/solbourne/solbourne/autoconf.c +++ b/sys/arch/solbourne/solbourne/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.8 2007/06/01 19:25:10 deraadt Exp $ */ +/* $OpenBSD: autoconf.c,v 1.9 2008/03/23 17:05:41 deraadt Exp $ */ /* OpenBSD: autoconf.c,v 1.64 2005/03/23 17:10:24 miod Exp */ /* @@ -221,10 +221,6 @@ bootpath_build() boothowto |= RB_ASKNAME; break; - case 'b': - boothowto |= RB_DFLTROOT; - break; - case 'c': boothowto |= RB_CONFIG; break; diff --git a/sys/arch/sparc/sparc/autoconf.c b/sys/arch/sparc/sparc/autoconf.c index f6c6fe6cb02..dfcf8622fcc 100644 --- a/sys/arch/sparc/sparc/autoconf.c +++ b/sys/arch/sparc/sparc/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.80 2007/06/01 19:25:10 deraadt Exp $ */ +/* $OpenBSD: autoconf.c,v 1.81 2008/03/23 17:05:41 deraadt Exp $ */ /* $NetBSD: autoconf.c,v 1.73 1997/07/29 09:41:53 fair Exp $ */ /* @@ -425,10 +425,6 @@ bootpath_build() boothowto |= RB_ASKNAME; break; - case 'b': - boothowto |= RB_DFLTROOT; - break; - case 'c': boothowto |= RB_CONFIG; break; diff --git a/sys/arch/zaurus/zaurus/zaurus_machdep.c b/sys/arch/zaurus/zaurus/zaurus_machdep.c index 688b31645db..ba127ac3e0b 100644 --- a/sys/arch/zaurus/zaurus/zaurus_machdep.c +++ b/sys/arch/zaurus/zaurus/zaurus_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: zaurus_machdep.c,v 1.27 2007/05/19 15:49:06 miod Exp $ */ +/* $OpenBSD: zaurus_machdep.c,v 1.28 2008/03/23 17:05:42 deraadt Exp $ */ /* $NetBSD: lubbock_machdep.c,v 1.2 2003/07/15 00:25:06 lukem Exp $ */ /* @@ -656,9 +656,6 @@ initarm(void *arg) /* XXX should really be done after setting up the console, but we * XXX need to parse the console selection flags right now. */ process_kernel_args((char *)0xa0200000 - MAX_BOOT_STRING - 1); -#ifdef RAMDISK_HOOKS - boothowto |= RB_DFLTROOT; -#endif /* RAMDISK_HOOKS */ /* * This test will work for now but has to be revised when support diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c index a07904647e4..9a8f851a817 100644 --- a/sys/kern/subr_disk.c +++ b/sys/kern/subr_disk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_disk.c,v 1.68 2007/12/23 01:59:58 dlg Exp $ */ +/* $OpenBSD: subr_disk.c,v 1.69 2008/03/23 17:05:40 deraadt Exp $ */ /* $NetBSD: subr_disk.c,v 1.17 1996/03/16 23:17:08 christos Exp $ */ /* @@ -1064,9 +1064,6 @@ setroot(struct device *bootdv, int part, int exitflags) extern char *nfsbootdevname; #endif - if (boothowto & RB_DFLTROOT) - return; - #ifdef RAMDISK_HOOKS bootdv = &fakerdrootdev; mountroot = NULL; |