diff --git a/share/man/man9/cpu_rootconf.9 b/share/man/man9/cpu_rootconf.9 index 8bb5d3fb2514..f62fba337b80 100644 --- a/share/man/man9/cpu_rootconf.9 +++ b/share/man/man9/cpu_rootconf.9 @@ -1,4 +1,4 @@ -.\" $NetBSD: cpu_rootconf.9,v 1.6 2010/04/13 07:32:31 jruoho Exp $ +.\" $NetBSD: cpu_rootconf.9,v 1.7 2012/07/29 18:05:48 mlelstv Exp $ .\" .\" Copyright (c) 2002 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -32,6 +32,7 @@ .Os .Sh NAME .Nm cpu_rootconf , +.Nm rootconf , .Nm setroot .Nd root file system setup .Sh SYNOPSIS @@ -40,6 +41,8 @@ .Ft void .Fn cpu_rootconf "void" .Ft void +.Fn rootconf "void" +.Ft void .Fn setroot "device_t bootdv" "int bootpartition" .Sh DESCRIPTION The @@ -47,16 +50,33 @@ The is a machine-dependent interface invoked during system bootstrap to determine the root file system device and initialize machine-dependent file system state. -.Pp -The .Fn cpu_rootconf -function invokes the machine-independent -.Fn setroot -function to record the boot/root device -.Fa bootdv -and the boot partition information -.Fa bootpartition +provides the global variables +.Fa booted_device, +.Fa booted_partition , +.Fa booted_startblk +and +.Fa booted_nblks +and invokes the machine-independent function +.Fa rootconf +which +.Fa rootconf +then calls the function +.Fa setroot +to record the boot/root device and the boot partition information for use in machine-independent code. +.Pp +For disk boot, if +.Fa booted_nblks +is not 0, then +.Fa booted_startblk +and +.Fa booted_nblks +are supposed to specify a disk wedge that is used as the root device. +Otherwise the +.Fa booted_partition +is used. .Sh SEE ALSO .Xr boot 8 , -.Xr boothowto 9 +.Xr boothowto 9 , +.Xr dk 4 diff --git a/sys/arch/acorn26/acorn26/autoconf.c b/sys/arch/acorn26/acorn26/autoconf.c index 300b845246c6..6fa478b0d01a 100644 --- a/sys/arch/acorn26/acorn26/autoconf.c +++ b/sys/arch/acorn26/acorn26/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.8 2011/12/17 14:51:07 kiyohara Exp $ */ +/* $NetBSD: autoconf.c,v 1.9 2012/07/29 18:05:39 mlelstv Exp $ */ /*- * Copyright (c) 1998, 1999 Ben Harris * All rights reserved. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.8 2011/12/17 14:51:07 kiyohara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.9 2012/07/29 18:05:39 mlelstv Exp $"); #include #include @@ -57,8 +57,7 @@ void cpu_rootconf(void) { - /* XXX This could actually do something */ - setroot(NULL, 0); + rootconf(); } void diff --git a/sys/arch/acorn32/acorn32/autoconf.c b/sys/arch/acorn32/acorn32/autoconf.c index e91700c489fe..eae62983e20e 100644 --- a/sys/arch/acorn32/acorn32/autoconf.c +++ b/sys/arch/acorn32/acorn32/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.17 2011/06/03 07:35:37 matt Exp $ */ +/* $NetBSD: autoconf.c,v 1.18 2012/07/29 18:05:39 mlelstv Exp $ */ /* * Copyright (c) 1994-1998 Mark Brinicombe. @@ -43,7 +43,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.17 2011/06/03 07:35:37 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.18 2012/07/29 18:05:39 mlelstv Exp $"); #include "opt_md.h" @@ -137,7 +137,7 @@ cpu_rootconf(void) printf("boot device: %s\n", booted_device != NULL ? device_xname(booted_device) : ""); #endif - setroot(booted_device, booted_partition); + rootconf(); } diff --git a/sys/arch/algor/algor/autoconf.c b/sys/arch/algor/algor/autoconf.c index 18ff61b2970a..9f3633f9149f 100644 --- a/sys/arch/algor/algor/autoconf.c +++ b/sys/arch/algor/algor/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.20 2011/07/09 16:03:00 matt Exp $ */ +/* $NetBSD: autoconf.c,v 1.21 2012/07/29 18:05:39 mlelstv Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.20 2011/07/09 16:03:00 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.21 2012/07/29 18:05:39 mlelstv Exp $"); #include "opt_algor_p4032.h" #include "opt_algor_p5064.h" @@ -77,7 +77,7 @@ void cpu_rootconf(void) { - setroot(booted_device, booted_partition); + rootconf(); } #if defined(ALGOR_P4032) diff --git a/sys/arch/alpha/alpha/autoconf.c b/sys/arch/alpha/alpha/autoconf.c index 051400a2c775..674a4c74a840 100644 --- a/sys/arch/alpha/alpha/autoconf.c +++ b/sys/arch/alpha/alpha/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.51 2012/02/06 02:14:10 matt Exp $ */ +/* $NetBSD: autoconf.c,v 1.52 2012/07/29 18:05:39 mlelstv Exp $ */ /* * Copyright (c) 1992, 1993 @@ -42,7 +42,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.51 2012/02/06 02:14:10 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.52 2012/07/29 18:05:39 mlelstv Exp $"); #include #include @@ -100,7 +100,7 @@ cpu_rootconf(void) if (booted_device == NULL) printf("WARNING: can't figure what device matches \"%s\"\n", bootinfo.booted_dev); - setroot(booted_device, booted_partition); + rootconf(); } void diff --git a/sys/arch/amiga/amiga/autoconf.c b/sys/arch/amiga/amiga/autoconf.c index 6bed71a54267..90748d35cc94 100644 --- a/sys/arch/amiga/amiga/autoconf.c +++ b/sys/arch/amiga/amiga/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.112 2012/07/13 08:47:07 rkujawa Exp $ */ +/* $NetBSD: autoconf.c,v 1.113 2012/07/29 18:05:39 mlelstv Exp $ */ /* * Copyright (c) 1994 Christian E. Hopps @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.112 2012/07/13 08:47:07 rkujawa Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.113 2012/07/29 18:05:39 mlelstv Exp $"); #include #include @@ -127,10 +127,7 @@ cpu_rootconf(void) #ifdef DEBUG_KERNEL_START printf("survived findroot()\n"); #endif - setroot(booted_device, booted_partition); -#ifdef DEBUG_KERNEL_START - printf("survived setroot()\n"); -#endif + rootconf(); } /*ARGSUSED*/ diff --git a/sys/arch/amigappc/amigappc/autoconf.c b/sys/arch/amigappc/amigappc/autoconf.c index 1ceb26406b6f..82fc1264261c 100644 --- a/sys/arch/amigappc/amigappc/autoconf.c +++ b/sys/arch/amigappc/amigappc/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.4 2011/06/18 08:08:27 matt Exp $ */ +/* $NetBSD: autoconf.c,v 1.5 2012/07/29 18:05:39 mlelstv Exp $ */ /* * Copyright (c) 1994 Christian E. Hopps @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.4 2011/06/18 08:08:27 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.5 2012/07/29 18:05:39 mlelstv Exp $"); #include #include @@ -91,10 +91,7 @@ cpu_rootconf(void) #ifdef DEBUG_KERNEL_START printf("survived findroot()\n"); #endif - setroot(booted_device, booted_partition); -#ifdef DEBUG_KERNEL_START - printf("survived setroot()\n"); -#endif + rootconf(); } /*ARGSUSED*/ diff --git a/sys/arch/arc/arc/autoconf.c b/sys/arch/arc/arc/autoconf.c index f1b7ea0c234d..ea3ed2775b8d 100644 --- a/sys/arch/arc/arc/autoconf.c +++ b/sys/arch/arc/arc/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.33 2011/02/20 07:52:42 matt Exp $ */ +/* $NetBSD: autoconf.c,v 1.34 2012/07/29 18:05:39 mlelstv Exp $ */ /* $OpenBSD: autoconf.c,v 1.9 1997/05/18 13:45:20 pefo Exp $ */ /* @@ -88,7 +88,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.33 2011/02/20 07:52:42 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.34 2012/07/29 18:05:39 mlelstv Exp $"); #include #include @@ -166,7 +166,8 @@ cpu_rootconf(void) printf("boot device: %s\n", booted_device ? booted_device->dv_xname : ""); - setroot(booted_device, booted_device ? bootdev_data->partition : 0); + booted_partition = booted_device ? bootdev_data->partition : 0; + rootconf(); } struct devmap { diff --git a/sys/arch/atari/atari/autoconf.c b/sys/arch/atari/atari/autoconf.c index 6b0cb803e323..f6f0551eb814 100644 --- a/sys/arch/atari/atari/autoconf.c +++ b/sys/arch/atari/atari/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.62 2012/06/30 10:37:00 tsutsui Exp $ */ +/* $NetBSD: autoconf.c,v 1.63 2012/07/29 18:05:40 mlelstv Exp $ */ /* * Copyright (c) 1995 Leo Weppelman @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.62 2012/06/30 10:37:00 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.63 2012/07/29 18:05:40 mlelstv Exp $"); #include "opt_md.h" @@ -119,7 +119,7 @@ cpu_rootconf(void) } } #endif - setroot(booted_device, booted_partition); + rootconf(); } /*ARGSUSED*/ diff --git a/sys/arch/bebox/bebox/autoconf.c b/sys/arch/bebox/bebox/autoconf.c index fbc6339e78a2..dd9a4b09eb29 100644 --- a/sys/arch/bebox/bebox/autoconf.c +++ b/sys/arch/bebox/bebox/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.24 2011/06/18 08:08:27 matt Exp $ */ +/* $NetBSD: autoconf.c,v 1.25 2012/07/29 18:05:40 mlelstv Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -44,7 +44,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.24 2011/06/18 08:08:27 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.25 2012/07/29 18:05:40 mlelstv Exp $"); #include #include @@ -100,7 +100,7 @@ cpu_rootconf(void) aprint_normal("boot device: %s\n", booted_device ? device_xname(booted_device) : ""); - setroot(booted_device, booted_partition); + rootconf(); } /* diff --git a/sys/arch/cats/cats/autoconf.c b/sys/arch/cats/cats/autoconf.c index 79c9de6d0d98..7842ee793245 100644 --- a/sys/arch/cats/cats/autoconf.c +++ b/sys/arch/cats/cats/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.16 2009/03/18 10:22:27 cegger Exp $ */ +/* $NetBSD: autoconf.c,v 1.17 2012/07/29 18:05:40 mlelstv Exp $ */ /* * Copyright (c) 1994-1998 Mark Brinicombe. @@ -41,7 +41,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.16 2009/03/18 10:22:27 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.17 2012/07/29 18:05:40 mlelstv Exp $"); #include "opt_md.h" @@ -121,7 +121,7 @@ cpu_rootconf(void) set_root_device(); printf("boot device: %s\n", booted_device != NULL ? booted_device->dv_xname : ""); - setroot(booted_device, booted_partition); + rootconf(); } diff --git a/sys/arch/cesfic/cesfic/autoconf.c b/sys/arch/cesfic/cesfic/autoconf.c index 5811ddd73f79..2027ff9caeaa 100644 --- a/sys/arch/cesfic/cesfic/autoconf.c +++ b/sys/arch/cesfic/cesfic/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.25 2011/06/06 16:52:18 matt Exp $ */ +/* $NetBSD: autoconf.c,v 1.26 2012/07/29 18:05:40 mlelstv Exp $ */ /* * Copyright (c) 1997, 1999 @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.25 2011/06/06 16:52:18 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.26 2012/07/29 18:05:40 mlelstv Exp $"); #include #include @@ -151,5 +151,5 @@ cpu_configure(void) void cpu_rootconf(void) { - setroot(0, 0); + rootconf(); } diff --git a/sys/arch/cobalt/cobalt/autoconf.c b/sys/arch/cobalt/cobalt/autoconf.c index 70a21cc3d398..06ccce01913f 100644 --- a/sys/arch/cobalt/cobalt/autoconf.c +++ b/sys/arch/cobalt/cobalt/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.29 2011/07/09 16:09:01 matt Exp $ */ +/* $NetBSD: autoconf.c,v 1.30 2012/07/29 18:05:40 mlelstv Exp $ */ /* * Copyright (c) 2000 Soren S. Jorvang. All rights reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.29 2011/07/09 16:09:01 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.30 2012/07/29 18:05:40 mlelstv Exp $"); #include #include @@ -70,7 +70,7 @@ cpu_rootconf(void) printf("boot device: %s\n", booted_device ? booted_device->dv_xname : ""); - setroot(booted_device, booted_partition); + rootconf(); } void diff --git a/sys/arch/dreamcast/dreamcast/autoconf.c b/sys/arch/dreamcast/dreamcast/autoconf.c index 407c32b96df5..9aaa144832f5 100644 --- a/sys/arch/dreamcast/dreamcast/autoconf.c +++ b/sys/arch/dreamcast/dreamcast/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.9 2008/04/28 20:23:16 martin Exp $ */ +/* $NetBSD: autoconf.c,v 1.10 2012/07/29 18:05:40 mlelstv Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.9 2008/04/28 20:23:16 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.10 2012/07/29 18:05:40 mlelstv Exp $"); #include #include @@ -52,5 +52,5 @@ cpu_rootconf(void) { /* No boot information */ - setroot(0, 0); + rootconf(); } diff --git a/sys/arch/emips/emips/autoconf.c b/sys/arch/emips/emips/autoconf.c index 2f7148f5cf9c..fee5bed791c1 100644 --- a/sys/arch/emips/emips/autoconf.c +++ b/sys/arch/emips/emips/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.5 2011/06/12 03:21:21 tsutsui Exp $ */ +/* $NetBSD: autoconf.c,v 1.6 2012/07/29 18:05:47 mlelstv Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.5 2011/06/12 03:21:21 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.6 2012/07/29 18:05:47 mlelstv Exp $"); #include #include @@ -142,7 +142,7 @@ cpu_rootconf(void) booted_device ? device_xname(booted_device) : "", booted_partition); - setroot(booted_device, booted_partition); + rootconf(); } /* diff --git a/sys/arch/evbarm/evbarm/autoconf.c b/sys/arch/evbarm/evbarm/autoconf.c index cc1217f7686e..86e057270426 100644 --- a/sys/arch/evbarm/evbarm/autoconf.c +++ b/sys/arch/evbarm/evbarm/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.12 2008/04/28 20:23:16 martin Exp $ */ +/* $NetBSD: autoconf.c,v 1.13 2012/07/29 18:05:41 mlelstv Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.12 2008/04/28 20:23:16 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.13 2012/07/29 18:05:41 mlelstv Exp $"); #include "opt_md.h" @@ -56,7 +56,7 @@ cpu_rootconf(void) { aprint_normal("boot device: %s\n", booted_device != NULL ? booted_device->dv_xname : ""); - setroot(booted_device, booted_partition); + rootconf(); } diff --git a/sys/arch/evbmips/adm5120/autoconf.c b/sys/arch/evbmips/adm5120/autoconf.c index c892af759147..19c560b4e0ba 100644 --- a/sys/arch/evbmips/adm5120/autoconf.c +++ b/sys/arch/evbmips/adm5120/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.4 2010/01/22 08:56:05 martin Exp $ */ +/* $NetBSD: autoconf.c,v 1.5 2012/07/29 18:05:41 mlelstv Exp $ */ /*- * Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko. @@ -60,7 +60,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.4 2010/01/22 08:56:05 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.5 2012/07/29 18:05:41 mlelstv Exp $"); #include #include @@ -90,7 +90,7 @@ void cpu_rootconf(void) { - setroot(booted_device, booted_partition); + rootconf(); } void diff --git a/sys/arch/evbmips/alchemy/autoconf.c b/sys/arch/evbmips/alchemy/autoconf.c index 379d9d5b3bca..5df7cbbcc7ca 100644 --- a/sys/arch/evbmips/alchemy/autoconf.c +++ b/sys/arch/evbmips/alchemy/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.17 2010/01/22 08:56:05 martin Exp $ */ +/* $NetBSD: autoconf.c,v 1.18 2012/07/29 18:05:41 mlelstv Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.17 2010/01/22 08:56:05 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.18 2012/07/29 18:05:41 mlelstv Exp $"); #include #include @@ -74,7 +74,7 @@ void cpu_rootconf(void) { - setroot(booted_device, booted_partition); + rootconf(); } void diff --git a/sys/arch/evbmips/atheros/autoconf.c b/sys/arch/evbmips/atheros/autoconf.c index d24a47b77ebb..cea96e80483f 100644 --- a/sys/arch/evbmips/atheros/autoconf.c +++ b/sys/arch/evbmips/atheros/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.10 2011/07/07 05:06:44 matt Exp $ */ +/* $NetBSD: autoconf.c,v 1.11 2012/07/29 18:05:41 mlelstv Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.10 2011/07/07 05:06:44 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.11 2012/07/29 18:05:41 mlelstv Exp $"); #include #include @@ -67,7 +67,7 @@ void cpu_rootconf(void) { - setroot(booted_device, booted_partition); + rootconf(); } void diff --git a/sys/arch/evbmips/gdium/autoconf.c b/sys/arch/evbmips/gdium/autoconf.c index 15faaf0f7289..67b410d8f6fc 100644 --- a/sys/arch/evbmips/gdium/autoconf.c +++ b/sys/arch/evbmips/gdium/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.4 2011/07/22 20:41:57 macallan Exp $ */ +/* $NetBSD: autoconf.c,v 1.5 2012/07/29 18:05:41 mlelstv Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.4 2011/07/22 20:41:57 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.5 2012/07/29 18:05:41 mlelstv Exp $"); #include #include @@ -74,7 +74,7 @@ cpu_rootconf(void) printf("boot device: %s\n", booted_device ? booted_device->dv_xname : ""); - setroot(booted_device, booted_partition); + rootconf(); } extern char bootstring[]; diff --git a/sys/arch/evbmips/loongson/autoconf.c b/sys/arch/evbmips/loongson/autoconf.c index 9964983c5d14..9ce2d2a3a65d 100644 --- a/sys/arch/evbmips/loongson/autoconf.c +++ b/sys/arch/evbmips/loongson/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.2 2012/03/02 13:20:57 nonaka Exp $ */ +/* $NetBSD: autoconf.c,v 1.3 2012/07/29 18:05:41 mlelstv Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.2 2012/03/02 13:20:57 nonaka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.3 2012/07/29 18:05:41 mlelstv Exp $"); #include #include @@ -77,7 +77,7 @@ cpu_rootconf(void) printf("boot device: %s\n", booted_device ? booted_device->dv_xname : ""); - setroot(booted_device, booted_partition); + rootconf(); } extern char bootstring[]; diff --git a/sys/arch/evbmips/malta/autoconf.c b/sys/arch/evbmips/malta/autoconf.c index e184f42d569c..6d9a3c52ddeb 100644 --- a/sys/arch/evbmips/malta/autoconf.c +++ b/sys/arch/evbmips/malta/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.15 2009/11/05 00:35:43 dyoung Exp $ */ +/* $NetBSD: autoconf.c,v 1.16 2012/07/29 18:05:41 mlelstv Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.15 2009/11/05 00:35:43 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.16 2012/07/29 18:05:41 mlelstv Exp $"); #include #include @@ -74,7 +74,7 @@ cpu_rootconf(void) printf("boot device: %s\n", booted_device ? booted_device->dv_xname : ""); - setroot(booted_device, booted_partition); + rootconf(); } extern char bootstring[]; diff --git a/sys/arch/evbmips/rasoc/autoconf.c b/sys/arch/evbmips/rasoc/autoconf.c index dd95804b93a5..8b9adcc788f9 100644 --- a/sys/arch/evbmips/rasoc/autoconf.c +++ b/sys/arch/evbmips/rasoc/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.2 2011/07/28 15:50:13 matt Exp $ */ +/* $NetBSD: autoconf.c,v 1.3 2012/07/29 18:05:42 mlelstv Exp $ */ /*- * Copyright (c) 2011 CradlePoint Technology, Inc. * All rights reserved. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.2 2011/07/28 15:50:13 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.3 2012/07/29 18:05:42 mlelstv Exp $"); #include #include @@ -58,7 +58,7 @@ cpu_configure(void) void cpu_rootconf(void) { - setroot(booted_device, booted_partition); + rootconf(); } void diff --git a/sys/arch/evbmips/rmixl/autoconf.c b/sys/arch/evbmips/rmixl/autoconf.c index 984654f35ceb..3436f9604a74 100644 --- a/sys/arch/evbmips/rmixl/autoconf.c +++ b/sys/arch/evbmips/rmixl/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.5 2012/02/12 16:34:08 matt Exp $ */ +/* $NetBSD: autoconf.c,v 1.6 2012/07/29 18:05:41 mlelstv Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.5 2012/02/12 16:34:08 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.6 2012/07/29 18:05:41 mlelstv Exp $"); #include #include @@ -74,7 +74,7 @@ cpu_rootconf(void) printf("boot device: %s\n", booted_device ? booted_device->dv_xname : ""); - setroot(booted_device, booted_partition); + rootconf(); } extern char bootstring[]; diff --git a/sys/arch/evbppc/ev64260/autoconf.c b/sys/arch/evbppc/ev64260/autoconf.c index 6f37724dda4b..2f9ce8d77418 100644 --- a/sys/arch/evbppc/ev64260/autoconf.c +++ b/sys/arch/evbppc/ev64260/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.16 2011/06/18 08:08:27 matt Exp $ */ +/* $NetBSD: autoconf.c,v 1.17 2012/07/29 18:05:42 mlelstv Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -44,7 +44,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.16 2011/06/18 08:08:27 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.17 2012/07/29 18:05:42 mlelstv Exp $"); #include #include @@ -88,7 +88,7 @@ cpu_rootconf(void) printf("boot device: %s\n", booted_device ? device_xname(booted_device) : ""); - setroot(booted_device, booted_partition); + rootconf(); } dev_t bootdev = 0; diff --git a/sys/arch/evbppc/explora/autoconf.c b/sys/arch/evbppc/explora/autoconf.c index d3b8c0cab0e1..9285c98b7084 100644 --- a/sys/arch/evbppc/explora/autoconf.c +++ b/sys/arch/evbppc/explora/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.12 2011/12/12 11:23:57 kiyohara Exp $ */ +/* $NetBSD: autoconf.c,v 1.13 2012/07/29 18:05:42 mlelstv Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.12 2011/12/12 11:23:57 kiyohara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.13 2012/07/29 18:05:42 mlelstv Exp $"); #include #include @@ -57,7 +57,7 @@ cpu_configure(void) void cpu_rootconf(void) { - setroot(booted_device, booted_partition); + rootconf(); } void diff --git a/sys/arch/evbppc/mpc85xx/autoconf.c b/sys/arch/evbppc/mpc85xx/autoconf.c index bfde27235ae3..422cfab12495 100644 --- a/sys/arch/evbppc/mpc85xx/autoconf.c +++ b/sys/arch/evbppc/mpc85xx/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.5 2011/06/24 23:54:37 matt Exp $ */ +/* $NetBSD: autoconf.c,v 1.6 2012/07/29 18:05:42 mlelstv Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.5 2011/06/24 23:54:37 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.6 2012/07/29 18:05:42 mlelstv Exp $"); #define __INTR_PRIVATE @@ -75,7 +75,7 @@ void cpu_rootconf(void) { - setroot(booted_device, booted_partition); + rootconf(); } void diff --git a/sys/arch/evbppc/obs405/obs405_autoconf.c b/sys/arch/evbppc/obs405/obs405_autoconf.c index c0d3c7cdd76f..ed0e1b325a0c 100644 --- a/sys/arch/evbppc/obs405/obs405_autoconf.c +++ b/sys/arch/evbppc/obs405/obs405_autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: obs405_autoconf.c,v 1.5 2011/06/18 06:44:26 matt Exp $ */ +/* $NetBSD: obs405_autoconf.c,v 1.6 2012/07/29 18:05:42 mlelstv Exp $ */ /* * Copyright 2004 Shigeyuki Fukushima. @@ -33,7 +33,7 @@ * DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: obs405_autoconf.c,v 1.5 2011/06/18 06:44:26 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: obs405_autoconf.c,v 1.6 2012/07/29 18:05:42 mlelstv Exp $"); #include #include @@ -51,7 +51,7 @@ void cpu_rootconf(void) { - setroot(booted_device, booted_partition); + rootconf(); } void diff --git a/sys/arch/evbppc/pmppc/autoconf.c b/sys/arch/evbppc/pmppc/autoconf.c index 174dbc536413..fc4aed5b58e6 100644 --- a/sys/arch/evbppc/pmppc/autoconf.c +++ b/sys/arch/evbppc/pmppc/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.6 2011/06/18 06:44:27 matt Exp $ */ +/* $NetBSD: autoconf.c,v 1.7 2012/07/29 18:05:42 mlelstv Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -44,7 +44,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.6 2011/06/18 06:44:27 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.7 2012/07/29 18:05:42 mlelstv Exp $"); #include #include @@ -81,7 +81,7 @@ cpu_rootconf(void) printf("boot device: %s\n", booted_device ? device_xname(booted_device) : ""); - setroot(booted_device, booted_partition); + rootconf(); } u_long bootdev = 0; /* should be dev_t, but not until 32 bits */ diff --git a/sys/arch/evbppc/virtex/autoconf.c b/sys/arch/evbppc/virtex/autoconf.c index b9e27982561a..6c824107b1aa 100644 --- a/sys/arch/evbppc/virtex/autoconf.c +++ b/sys/arch/evbppc/virtex/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.4 2011/12/12 11:23:57 kiyohara Exp $ */ +/* $NetBSD: autoconf.c,v 1.5 2012/07/29 18:05:42 mlelstv Exp $ */ /* * Copyright (c) 2006 Jachym Holecek @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.4 2011/12/12 11:23:57 kiyohara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.5 2012/07/29 18:05:42 mlelstv Exp $"); #include #include @@ -102,5 +102,5 @@ cpu_configure(void) void cpu_rootconf(void) { - setroot(booted_device, booted_partition); + rootconf(); } diff --git a/sys/arch/evbppc/walnut/autoconf.c b/sys/arch/evbppc/walnut/autoconf.c index b9f8d22bf85b..80e148ba4f0e 100644 --- a/sys/arch/evbppc/walnut/autoconf.c +++ b/sys/arch/evbppc/walnut/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.20 2011/12/12 11:23:57 kiyohara Exp $ */ +/* $NetBSD: autoconf.c,v 1.21 2012/07/29 18:05:42 mlelstv Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.20 2011/12/12 11:23:57 kiyohara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.21 2012/07/29 18:05:42 mlelstv Exp $"); #include #include @@ -82,7 +82,7 @@ void cpu_rootconf(void) { - setroot(booted_device, booted_partition); + rootconf(); } void diff --git a/sys/arch/evbsh3/evbsh3/autoconf.c b/sys/arch/evbsh3/evbsh3/autoconf.c index 4537325cff09..bd132df79864 100644 --- a/sys/arch/evbsh3/evbsh3/autoconf.c +++ b/sys/arch/evbsh3/evbsh3/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.10 2010/04/06 15:54:30 nonaka Exp $ */ +/* $NetBSD: autoconf.c,v 1.11 2012/07/29 18:05:42 mlelstv Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.10 2010/04/06 15:54:30 nonaka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.11 2012/07/29 18:05:42 mlelstv Exp $"); #include #include @@ -57,5 +57,5 @@ cpu_rootconf(void) { /* No boot information */ - setroot(0, 0); + rootconf(); } diff --git a/sys/arch/ews4800mips/ews4800mips/autoconf.c b/sys/arch/ews4800mips/ews4800mips/autoconf.c index 1a3ec22c3051..138bc16dc761 100644 --- a/sys/arch/ews4800mips/ews4800mips/autoconf.c +++ b/sys/arch/ews4800mips/ews4800mips/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.8 2011/02/20 07:55:20 matt Exp $ */ +/* $NetBSD: autoconf.c,v 1.9 2012/07/29 18:05:43 mlelstv Exp $ */ /*- * Copyright (c) 2001, 2004 The NetBSD Foundation, Inc. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.8 2011/02/20 07:55:20 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.9 2012/07/29 18:05:43 mlelstv Exp $"); #include "opt_sbd.h" @@ -112,7 +112,8 @@ cpu_rootconf(void) if (bootdev_name && (dv = device_find_by_xname(bootdev_name)) != NULL) { - setroot(dv, partition); - } else - setroot(0, 0); + booted_device = dv; + booted_partition = partition; + } + rootconf(); } diff --git a/sys/arch/hp300/hp300/autoconf.c b/sys/arch/hp300/hp300/autoconf.c index 36bd1d1017d8..7a036f58ccbc 100644 --- a/sys/arch/hp300/hp300/autoconf.c +++ b/sys/arch/hp300/hp300/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.99 2012/01/27 18:52:55 para Exp $ */ +/* $NetBSD: autoconf.c,v 1.100 2012/07/29 18:05:43 mlelstv Exp $ */ /*- * Copyright (c) 1996, 1997, 2002 The NetBSD Foundation, Inc. @@ -88,7 +88,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.99 2012/01/27 18:52:55 para Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.100 2012/07/29 18:05:43 mlelstv Exp $"); #include "dvbox.h" #include "gbox.h" @@ -324,8 +324,6 @@ cpu_rootconf(void) } } - dv = booted_device; - /* * If wild carded root device and wired down NFS root file system, * pick the network interface device to use. @@ -338,7 +336,7 @@ cpu_rootconf(void) dd != NULL; dd = LIST_NEXT(dd, dd_list)) { if (device_class(dd->dd_dev) == DV_IFNET) { /* Got it! */ - dv = dd->dd_dev; + booted_device = dd->dd_dev; break; } } @@ -363,7 +361,7 @@ cpu_rootconf(void) if (booted_device != NULL && device_class(booted_device) == DV_TAPE) boothowto |= RB_ASKNAME; - setroot(dv, booted_partition); + rootconf(); /* * Set bootdev based on what we found as the root. diff --git a/sys/arch/hp700/hp700/autoconf.c b/sys/arch/hp700/hp700/autoconf.c index 2b8a8b940012..82ac9288edc4 100644 --- a/sys/arch/hp700/hp700/autoconf.c +++ b/sys/arch/hp700/hp700/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.47 2012/05/23 16:11:37 skrll Exp $ */ +/* $NetBSD: autoconf.c,v 1.48 2012/07/29 18:05:40 mlelstv Exp $ */ /* $OpenBSD: autoconf.c,v 1.15 2001/06/25 00:43:10 mickey Exp $ */ @@ -86,7 +86,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.47 2012/05/23 16:11:37 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.48 2012/07/29 18:05:40 mlelstv Exp $"); #include "opt_kgdb.h" #include "opt_useleds.h" @@ -475,7 +475,8 @@ cpu_rootconf(void) if (boot_device != NULL) printf("boot device: %s\n", boot_device->dv_xname ); - setroot(boot_device, 0); + booted_device = boot_device; + rootconf(); } diff --git a/sys/arch/hpcarm/hpcarm/autoconf.c b/sys/arch/hpcarm/hpcarm/autoconf.c index e5401027be8e..e04d53d642ca 100644 --- a/sys/arch/hpcarm/hpcarm/autoconf.c +++ b/sys/arch/hpcarm/hpcarm/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.19 2011/06/21 15:28:05 kiyohara Exp $ */ +/* $NetBSD: autoconf.c,v 1.20 2012/07/29 18:05:43 mlelstv Exp $ */ /* * Copyright (c) 1994-1998 Mark Brinicombe. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.19 2011/06/21 15:28:05 kiyohara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.20 2012/07/29 18:05:43 mlelstv Exp $"); #include "opt_md.h" @@ -129,7 +129,7 @@ cpu_rootconf(void) printf("boot device: %s\n", booted_device != NULL ? booted_device->dv_xname : ""); #endif - setroot(booted_device, booted_partition); + rootconf(); } diff --git a/sys/arch/hpcmips/hpcmips/autoconf.c b/sys/arch/hpcmips/hpcmips/autoconf.c index 4229bebd464f..fe8aa2bbd83c 100644 --- a/sys/arch/hpcmips/hpcmips/autoconf.c +++ b/sys/arch/hpcmips/hpcmips/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.24 2011/02/20 07:58:13 matt Exp $ */ +/* $NetBSD: autoconf.c,v 1.25 2012/07/29 18:05:43 mlelstv Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,11 +39,11 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.24 2011/02/20 07:58:13 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.25 2012/07/29 18:05:43 mlelstv Exp $"); #include #include -#include /* setroot() */ +#include #include #include @@ -88,7 +88,7 @@ cpu_rootconf(void) printf("boot device: %s\n", booted_device ? booted_device->dv_xname : ""); - setroot(booted_device, booted_partition); + rootconf(); } void diff --git a/sys/arch/hpcsh/hpcsh/autoconf.c b/sys/arch/hpcsh/hpcsh/autoconf.c index cdb4def09615..871cb81d3352 100644 --- a/sys/arch/hpcsh/hpcsh/autoconf.c +++ b/sys/arch/hpcsh/hpcsh/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.25 2011/07/19 15:30:53 dyoung Exp $ */ +/* $NetBSD: autoconf.c,v 1.26 2012/07/29 18:05:43 mlelstv Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.25 2011/07/19 15:30:53 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.26 2012/07/29 18:05:43 mlelstv Exp $"); #include "opt_md.h" @@ -102,7 +102,7 @@ cpu_rootconf(void) printf("boot device: %s\n", booted_device ? booted_device->dv_xname : ""); #endif - setroot(booted_device, booted_partition); + rootconf(); } void diff --git a/sys/arch/ia64/ia64/autoconf.c b/sys/arch/ia64/ia64/autoconf.c index 23037d76c6b5..e5b1dcf26a4c 100644 --- a/sys/arch/ia64/ia64/autoconf.c +++ b/sys/arch/ia64/ia64/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.5 2009/07/20 04:41:36 kiyohara Exp $ */ +/* $NetBSD: autoconf.c,v 1.6 2012/07/29 18:05:43 mlelstv Exp $ */ /* * Copyright (c) 2006 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ cpu_rootconf(void) { if (booted_device == NULL) /* XXX: Platform support. Match to boot device. */ printf("WARNING: can't figure what device matches \"%s\"\n", "XXX"); - setroot(booted_device, booted_partition); + rootconf(); } diff --git a/sys/arch/ibmnws/ibmnws/autoconf.c b/sys/arch/ibmnws/ibmnws/autoconf.c index 6b2ad5aa7338..38f249f392d5 100644 --- a/sys/arch/ibmnws/ibmnws/autoconf.c +++ b/sys/arch/ibmnws/ibmnws/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.11 2011/06/18 08:08:28 matt Exp $ */ +/* $NetBSD: autoconf.c,v 1.12 2012/07/29 18:05:43 mlelstv Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -83,7 +83,7 @@ cpu_rootconf(void) aprint_normal("boot device: %s\n", booted_device ? device_xname(booted_device) : ""); - setroot(booted_device, booted_partition); + rootconf(); } u_long bootdev = 0; /* should be dev_t, but not until 32 bits */ diff --git a/sys/arch/iyonix/iyonix/autoconf.c b/sys/arch/iyonix/iyonix/autoconf.c index ca5714f8791b..3098e0cb84aa 100644 --- a/sys/arch/iyonix/iyonix/autoconf.c +++ b/sys/arch/iyonix/iyonix/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.13 2012/07/29 00:07:06 matt Exp $ */ +/* $NetBSD: autoconf.c,v 1.14 2012/07/29 18:05:44 mlelstv Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.13 2012/07/29 00:07:06 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.14 2012/07/29 18:05:44 mlelstv Exp $"); #include "opt_md.h" @@ -63,7 +63,7 @@ cpu_rootconf(void) { aprint_normal("boot device: %s\n", booted_device != NULL ? booted_device->dv_xname : ""); - setroot(booted_device, booted_partition); + rootconf(); } diff --git a/sys/arch/landisk/landisk/autoconf.c b/sys/arch/landisk/landisk/autoconf.c index a2958a612e21..fc2c1c9d543f 100644 --- a/sys/arch/landisk/landisk/autoconf.c +++ b/sys/arch/landisk/landisk/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.5 2009/11/05 18:15:17 dyoung Exp $ */ +/* $NetBSD: autoconf.c,v 1.6 2012/07/29 18:05:44 mlelstv Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.5 2009/11/05 18:15:17 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.6 2012/07/29 18:05:44 mlelstv Exp $"); #include #include @@ -205,5 +205,5 @@ cpu_rootconf(void) printf("boot device: %s\n", booted_device ? booted_device->dv_xname : ""); - setroot(booted_device, booted_partition); + rootconf(); } diff --git a/sys/arch/luna68k/luna68k/autoconf.c b/sys/arch/luna68k/luna68k/autoconf.c index b7e1eb369828..8ee6dfeb720f 100644 --- a/sys/arch/luna68k/luna68k/autoconf.c +++ b/sys/arch/luna68k/luna68k/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.12 2009/03/18 10:22:31 cegger Exp $ */ +/* $NetBSD: autoconf.c,v 1.13 2012/07/29 18:05:44 mlelstv Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.12 2009/03/18 10:22:31 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.13 2012/07/29 18:05:44 mlelstv Exp $"); #include #include @@ -87,5 +87,5 @@ cpu_rootconf(void) printf("boot device: %s\n", (booted_device) ? booted_device->dv_xname : ""); - setroot(booted_device, 0); /* XXX partition 'a' XXX */ + rootconf(); } diff --git a/sys/arch/mac68k/mac68k/autoconf.c b/sys/arch/mac68k/mac68k/autoconf.c index 7d6cbcb49dfb..41a60cbc18a7 100644 --- a/sys/arch/mac68k/mac68k/autoconf.c +++ b/sys/arch/mac68k/mac68k/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.72 2008/06/13 10:01:32 cegger Exp $ */ +/* $NetBSD: autoconf.c,v 1.73 2012/07/29 18:05:44 mlelstv Exp $ */ /* * Copyright (c) 1992, 1993 @@ -49,7 +49,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.72 2008/06/13 10:01:32 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.73 2012/07/29 18:05:44 mlelstv Exp $"); #include #include @@ -102,7 +102,7 @@ cpu_rootconf(void) printf("boot device: %s\n", booted_device ? booted_device->dv_xname : ""); - setroot(booted_device, booted_partition); + rootconf(); } /* diff --git a/sys/arch/mipsco/mipsco/autoconf.c b/sys/arch/mipsco/mipsco/autoconf.c index 012bdf86cb8b..0b9e843f17d8 100644 --- a/sys/arch/mipsco/mipsco/autoconf.c +++ b/sys/arch/mipsco/mipsco/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.24 2011/02/20 07:56:16 matt Exp $ */ +/* $NetBSD: autoconf.c,v 1.25 2012/07/29 18:05:44 mlelstv Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -48,7 +48,7 @@ #define __INTR_PRIVATE #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.24 2011/02/20 07:56:16 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.25 2012/07/29 18:05:44 mlelstv Exp $"); #include #include @@ -106,7 +106,7 @@ cpu_rootconf(void) printf("boot device: %s\n", booted_device ? booted_device->dv_xname : ""); - setroot(booted_device, booted_partition); + rootconf(); } dev_t bootdev = 0; diff --git a/sys/arch/mmeye/mmeye/autoconf.c b/sys/arch/mmeye/mmeye/autoconf.c index 1a5f8f3f1589..d42bb2a21525 100644 --- a/sys/arch/mmeye/mmeye/autoconf.c +++ b/sys/arch/mmeye/mmeye/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.8 2011/02/19 10:46:28 kiyohara Exp $ */ +/* $NetBSD: autoconf.c,v 1.9 2012/07/29 18:05:44 mlelstv Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.8 2011/02/19 10:46:28 kiyohara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.9 2012/07/29 18:05:44 mlelstv Exp $"); #include #include @@ -72,7 +72,7 @@ cpu_rootconf(void) printf("boot device: %s\n", booted_device ? booted_device->dv_xname : ""); - setroot(booted_device, booted_partition); + rootconf(); } void diff --git a/sys/arch/mvme68k/mvme68k/autoconf.c b/sys/arch/mvme68k/mvme68k/autoconf.c index cbddf7736b8c..cc7c26646da0 100644 --- a/sys/arch/mvme68k/mvme68k/autoconf.c +++ b/sys/arch/mvme68k/mvme68k/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.45 2011/02/08 20:20:20 rmind Exp $ */ +/* $NetBSD: autoconf.c,v 1.46 2012/07/29 18:05:44 mlelstv Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -45,7 +45,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.45 2011/02/08 20:20:20 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.46 2012/07/29 18:05:44 mlelstv Exp $"); #include #include @@ -102,7 +102,8 @@ cpu_rootconf(void) else printf("\n"); - setroot(booted_device, bootpart); + booted_partition = bootpart; + rootconf(); } void diff --git a/sys/arch/mvmeppc/mvmeppc/autoconf.c b/sys/arch/mvmeppc/mvmeppc/autoconf.c index 46caaa7545a7..d106956e42be 100644 --- a/sys/arch/mvmeppc/mvmeppc/autoconf.c +++ b/sys/arch/mvmeppc/mvmeppc/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.12 2011/06/18 08:08:29 matt Exp $ */ +/* $NetBSD: autoconf.c,v 1.13 2012/07/29 18:05:44 mlelstv Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -44,7 +44,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.12 2011/06/18 08:08:29 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.13 2012/07/29 18:05:44 mlelstv Exp $"); #include #include @@ -80,7 +80,7 @@ cpu_rootconf(void) aprint_normal("boot device: %s\n", booted_device ? device_xname(booted_device) : ""); - setroot(booted_device, booted_partition); + rootconf(); } u_long bootdev = 0; /* should be dev_t, but not until 32 bits */ diff --git a/sys/arch/netwinder/netwinder/autoconf.c b/sys/arch/netwinder/netwinder/autoconf.c index 4559001b497e..e32e746ba619 100644 --- a/sys/arch/netwinder/netwinder/autoconf.c +++ b/sys/arch/netwinder/netwinder/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.10 2007/12/03 15:34:01 ad Exp $ */ +/* $NetBSD: autoconf.c,v 1.11 2012/07/29 18:05:45 mlelstv Exp $ */ /* * Copyright (c) 1994-1998 Mark Brinicombe. @@ -43,7 +43,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.10 2007/12/03 15:34:01 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.11 2012/07/29 18:05:45 mlelstv Exp $"); #include "opt_md.h" @@ -72,7 +72,7 @@ cpu_rootconf(void) { printf("boot device: %s\n", booted_device != NULL ? booted_device->dv_xname : ""); - setroot(booted_device, booted_partition); + rootconf(); } diff --git a/sys/arch/news68k/news68k/autoconf.c b/sys/arch/news68k/news68k/autoconf.c index 435916a31607..7d666c995d9e 100644 --- a/sys/arch/news68k/news68k/autoconf.c +++ b/sys/arch/news68k/news68k/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.20 2011/05/10 14:41:55 tsutsui Exp $ */ +/* $NetBSD: autoconf.c,v 1.21 2012/07/29 18:05:45 mlelstv Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -51,7 +51,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.20 2011/05/10 14:41:55 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.21 2012/07/29 18:05:45 mlelstv Exp $"); #include "scsibus.h" @@ -112,7 +112,7 @@ cpu_rootconf(void) printf("boot device: %s\n", booted_device ? booted_device->dv_xname : ""); - setroot(booted_device, booted_partition); + rootconf(); } u_long bootdev = 0; /* should be dev_t, but not until 32 bits */ diff --git a/sys/arch/newsmips/newsmips/autoconf.c b/sys/arch/newsmips/newsmips/autoconf.c index ede9bcfb95ff..ce28f77aeb5f 100644 --- a/sys/arch/newsmips/newsmips/autoconf.c +++ b/sys/arch/newsmips/newsmips/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.35 2011/03/09 13:21:36 tsutsui Exp $ */ +/* $NetBSD: autoconf.c,v 1.36 2012/07/29 18:05:45 mlelstv Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -49,7 +49,7 @@ #define __INTR_PRIVATE #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.35 2011/03/09 13:21:36 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.36 2012/07/29 18:05:45 mlelstv Exp $"); #include #include @@ -115,7 +115,7 @@ cpu_rootconf(void) printf("boot device: %s\n", booted_device ? booted_device->dv_xname : ""); - setroot(booted_device, booted_partition); + rootconf(); } u_long bootdev = 0; /* should be dev_t, but not until 32 bits */ diff --git a/sys/arch/next68k/next68k/autoconf.c b/sys/arch/next68k/next68k/autoconf.c index f65f31e3e22e..bbf5134af7ad 100644 --- a/sys/arch/next68k/next68k/autoconf.c +++ b/sys/arch/next68k/next68k/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.25 2011/05/10 14:45:28 tsutsui Exp $ */ +/* $NetBSD: autoconf.c,v 1.26 2012/07/29 18:05:45 mlelstv Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -47,7 +47,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.25 2011/05/10 14:45:28 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.26 2012/07/29 18:05:45 mlelstv Exp $"); #include #include @@ -144,7 +144,7 @@ cpu_rootconf(void) printf("boot device: %s\n", (booted_device) ? booted_device->dv_xname : ""); - setroot(booted_device, part); + rootconf(); } /* diff --git a/sys/arch/pmax/pmax/autoconf.c b/sys/arch/pmax/pmax/autoconf.c index 057f172c1879..c045b8887728 100644 --- a/sys/arch/pmax/pmax/autoconf.c +++ b/sys/arch/pmax/pmax/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.78 2011/07/09 17:32:30 matt Exp $ */ +/* $NetBSD: autoconf.c,v 1.79 2012/07/29 18:05:45 mlelstv Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.78 2011/07/09 17:32:30 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.79 2012/07/29 18:05:45 mlelstv Exp $"); #include #include @@ -151,7 +151,7 @@ cpu_rootconf(void) printf("boot device: %s\n", booted_device ? booted_device->dv_xname : ""); - setroot(booted_device, booted_partition); + rootconf(); } /* diff --git a/sys/arch/powerpc/oea/ofw_autoconf.c b/sys/arch/powerpc/oea/ofw_autoconf.c index ab650a5fc218..997890fdb279 100644 --- a/sys/arch/powerpc/oea/ofw_autoconf.c +++ b/sys/arch/powerpc/oea/ofw_autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: ofw_autoconf.c,v 1.16 2012/05/24 00:40:11 macallan Exp $ */ +/* $NetBSD: ofw_autoconf.c,v 1.17 2012/07/29 18:05:45 mlelstv Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. * Copyright (C) 1995, 1996 TooLs GmbH. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ofw_autoconf.c,v 1.16 2012/05/24 00:40:11 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ofw_autoconf.c,v 1.17 2012/07/29 18:05:45 mlelstv Exp $"); #ifdef ofppc #include "gtpci.h" @@ -484,7 +484,7 @@ cpu_rootconf(void) printf("boot device: %s\n", booted_device ? device_xname(booted_device) : ""); - setroot(booted_device, booted_partition); + rootconf(); } /* diff --git a/sys/arch/prep/prep/autoconf.c b/sys/arch/prep/prep/autoconf.c index 9107f118672b..19cdfa3621e2 100644 --- a/sys/arch/prep/prep/autoconf.c +++ b/sys/arch/prep/prep/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.24 2011/06/18 08:08:30 matt Exp $ */ +/* $NetBSD: autoconf.c,v 1.25 2012/07/29 18:05:45 mlelstv Exp $ */ /*- * Copyright (c) 2006 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.24 2011/06/18 08:08:30 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.25 2012/07/29 18:05:45 mlelstv Exp $"); #include #include @@ -87,7 +87,7 @@ cpu_rootconf(void) aprint_normal("boot device: %s\n", booted_device ? device_xname(booted_device) : ""); - setroot(booted_device, booted_partition); + rootconf(); } /* diff --git a/sys/arch/rs6000/rs6000/autoconf.c b/sys/arch/rs6000/rs6000/autoconf.c index e656daa2688c..020ccf0bcc86 100644 --- a/sys/arch/rs6000/rs6000/autoconf.c +++ b/sys/arch/rs6000/rs6000/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.3 2011/06/18 08:08:30 matt Exp $ */ +/* $NetBSD: autoconf.c,v 1.4 2012/07/29 18:05:47 mlelstv Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.3 2011/06/18 08:08:30 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.4 2012/07/29 18:05:47 mlelstv Exp $"); #include #include @@ -78,5 +78,5 @@ cpu_rootconf(void) aprint_normal("boot device: %s\n", booted_device ? device_xname(booted_device) : ""); - setroot(booted_device, booted_partition); + rootconf(); } diff --git a/sys/arch/sandpoint/sandpoint/autoconf.c b/sys/arch/sandpoint/sandpoint/autoconf.c index 4c8f4a1dc908..6e5116f8fe30 100644 --- a/sys/arch/sandpoint/sandpoint/autoconf.c +++ b/sys/arch/sandpoint/sandpoint/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.26 2012/07/28 23:11:01 matt Exp $ */ +/* $NetBSD: autoconf.c,v 1.27 2012/07/29 18:05:45 mlelstv Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.26 2012/07/28 23:11:01 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.27 2012/07/29 18:05:45 mlelstv Exp $"); #include #include @@ -101,7 +101,7 @@ cpu_rootconf(void) aprint_normal("boot device: %s\n", booted_device ? device_xname(booted_device) : ""); - setroot(booted_device, booted_partition); + rootconf(); } void diff --git a/sys/arch/sbmips/sbmips/autoconf.c b/sys/arch/sbmips/sbmips/autoconf.c index de2509af1d9c..d4f499b27a04 100644 --- a/sys/arch/sbmips/sbmips/autoconf.c +++ b/sys/arch/sbmips/sbmips/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.7 2011/02/20 07:47:38 matt Exp $ */ +/* $NetBSD: autoconf.c,v 1.8 2012/07/29 18:05:46 mlelstv Exp $ */ /* * Copyright 2000, 2001 @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.7 2011/02/20 07:47:38 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.8 2012/07/29 18:05:46 mlelstv Exp $"); #include #include @@ -63,7 +63,7 @@ cpu_rootconf(void) printf("boot device: %s\n", booted_device ? device_xname(booted_device) : ""); - setroot(booted_device, booted_partition); + rootconf(); } void diff --git a/sys/arch/sgimips/sgimips/autoconf.c b/sys/arch/sgimips/sgimips/autoconf.c index 8f18d3e6cfea..89732fa4af17 100644 --- a/sys/arch/sgimips/sgimips/autoconf.c +++ b/sys/arch/sgimips/sgimips/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.42 2009/03/18 10:22:35 cegger Exp $ */ +/* $NetBSD: autoconf.c,v 1.43 2012/07/29 18:05:46 mlelstv Exp $ */ /* * Copyright (c) 2000 Soren S. Jorvang @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.42 2009/03/18 10:22:35 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.43 2012/07/29 18:05:46 mlelstv Exp $"); #include "opt_ddb.h" @@ -163,7 +163,7 @@ cpu_rootconf(void) printf("boot device: %s\n", booted_device ? booted_device->dv_xname : ""); - setroot(booted_device, booted_partition); + rootconf(); } /* diff --git a/sys/arch/shark/shark/autoconf.c b/sys/arch/shark/shark/autoconf.c index ed093ec4f597..a25cca046436 100644 --- a/sys/arch/shark/shark/autoconf.c +++ b/sys/arch/shark/shark/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.17 2009/03/18 10:22:36 cegger Exp $ */ +/* $NetBSD: autoconf.c,v 1.18 2012/07/29 18:05:46 mlelstv Exp $ */ /* * Copyright (c) 1994-1998 Mark Brinicombe. @@ -43,7 +43,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.17 2009/03/18 10:22:36 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.18 2012/07/29 18:05:46 mlelstv Exp $"); #include "opt_md.h" @@ -148,7 +148,7 @@ cpu_rootconf(void) printf("boot device: %s\n", booted_device != NULL ? booted_device->dv_xname : ""); #endif - setroot(booted_device, booted_partition); + rootconf(); } diff --git a/sys/arch/sparc/sparc/autoconf.c b/sys/arch/sparc/sparc/autoconf.c index 33aad55aecfb..e8765c0d854d 100644 --- a/sys/arch/sparc/sparc/autoconf.c +++ b/sys/arch/sparc/sparc/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.243 2012/05/28 19:24:29 martin Exp $ */ +/* $NetBSD: autoconf.c,v 1.244 2012/07/29 18:05:46 mlelstv Exp $ */ /* * Copyright (c) 1996 @@ -48,7 +48,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.243 2012/05/28 19:24:29 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.244 2012/07/29 18:05:46 mlelstv Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -1000,17 +1000,15 @@ void cpu_rootconf(void) { struct bootpath *bp; - int bootpartition; bp = nbootpath == 0 ? NULL : &bootpath[nbootpath-1]; if (bp == NULL) - bootpartition = 0; + booted_partition = 0; else if (booted_device != bp->dev) - bootpartition = 0; + booted_partition = 0; else - bootpartition = bp->val[2]; - - setroot(booted_device, bootpartition); + booted_partition = bp->val[2]; + rootconf(); } /* diff --git a/sys/arch/sparc64/sparc64/autoconf.c b/sys/arch/sparc64/sparc64/autoconf.c index 1e3fa348798f..787ec8e0d7f1 100644 --- a/sys/arch/sparc64/sparc64/autoconf.c +++ b/sys/arch/sparc64/sparc64/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.187 2012/06/10 17:05:18 mlelstv Exp $ */ +/* $NetBSD: autoconf.c,v 1.188 2012/07/29 18:05:46 mlelstv Exp $ */ /* * Copyright (c) 1996 @@ -48,7 +48,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.187 2012/06/10 17:05:18 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.188 2012/07/29 18:05:46 mlelstv Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -504,11 +504,9 @@ cpu_rootconf(void) if (booted_device == NULL) { printf("FATAL: boot device not found, check your firmware " "settings!\n"); - setroot(NULL, 0); - return; } - setroot(booted_device, booted_partition); + rootconf(); } char * diff --git a/sys/arch/sun3/sun3/autoconf.c b/sys/arch/sun3/sun3/autoconf.c index 4e57cce374d5..066c35c4658a 100644 --- a/sys/arch/sun3/sun3/autoconf.c +++ b/sys/arch/sun3/sun3/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.75 2008/04/28 20:23:38 martin Exp $ */ +/* $NetBSD: autoconf.c,v 1.76 2012/07/29 18:05:46 mlelstv Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.75 2008/04/28 20:23:38 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.76 2012/07/29 18:05:46 mlelstv Exp $"); #include #include @@ -185,8 +185,6 @@ cpu_rootconf(void) { struct bootparam *bp; struct prom_n2f *nf; - struct device *boot_device; - int boot_partition; const char *devname; findfunc_t find; char promname[4]; @@ -205,8 +203,8 @@ cpu_rootconf(void) promname[2] = '\0'; /* Default to "unknown" */ - boot_device = NULL; - boot_partition = 0; + booted_device = NULL; + booted_partition = 0; devname = ""; partname[0] = '\0'; find = NULL; @@ -218,18 +216,18 @@ cpu_rootconf(void) break; } if (find) - boot_device = (*find)(promname, bp->ctlrNum, bp->unitNum); + booted_device = (*find)(promname, bp->ctlrNum, bp->unitNum); if (boot_device) { - devname = boot_device->dv_xname; - if (device_class(boot_device) == DV_DISK) { - boot_partition = bp->partNum & 7; - partname[0] = 'a' + boot_partition; + devname = booted_device->dv_xname; + if (device_class(booted_device) == DV_DISK) { + booted_partition = bp->partNum & 7; + partname[0] = 'a' + booted_partition; partname[1] = '\0'; } } printf("boot device: %s%s\n", devname, partname); - setroot(boot_device, boot_partition); + rootconf(); } /* diff --git a/sys/arch/sun68k/sun68k/autoconf.c b/sys/arch/sun68k/sun68k/autoconf.c index 3370df352bc8..08add903c67a 100644 --- a/sys/arch/sun68k/sun68k/autoconf.c +++ b/sys/arch/sun68k/sun68k/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.28 2008/07/01 15:15:34 tsutsui Exp $ */ +/* $NetBSD: autoconf.c,v 1.29 2012/07/29 18:05:46 mlelstv Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.28 2008/07/01 15:15:34 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.29 2012/07/29 18:05:46 mlelstv Exp $"); #include "opt_kgdb.h" @@ -313,8 +313,6 @@ void cpu_rootconf(void) { struct prom_n2f *nf; - device_t boot_device; - int boot_partition; const char *devname; findfunc_t find; char promname[4]; @@ -336,8 +334,8 @@ cpu_rootconf(void) (void)str2hex(++prompath, &prom_part); /* Default to "unknown" */ - boot_device = NULL; - boot_partition = 0; + booted_device = NULL; + booted_partition = 0; devname = ""; partname[0] = '\0'; find = NULL; @@ -349,18 +347,18 @@ cpu_rootconf(void) break; } if (find) - boot_device = (*find)(promname, prom_ctlr, prom_unit); - if (boot_device) { - devname = boot_device->dv_xname; - if (device_class(boot_device) == DV_DISK) { - boot_partition = prom_part & 7; - partname[0] = 'a' + boot_partition; + booted_device = (*find)(promname, prom_ctlr, prom_unit); + if (booted_device) { + devname = booted_device->dv_xname; + if (device_class(booted_device) == DV_DISK) { + booted_partition = prom_part & 7; + partname[0] = 'a' + booted_partition; partname[1] = '\0'; } } printf("boot device: %s%s\n", devname, partname); - setroot(boot_device, boot_partition); + rootconf(); } /* diff --git a/sys/arch/usermode/dev/cpu.c b/sys/arch/usermode/dev/cpu.c index d2cc791c0f23..a60c80c1922a 100644 --- a/sys/arch/usermode/dev/cpu.c +++ b/sys/arch/usermode/dev/cpu.c @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.71 2012/06/25 14:43:54 reinoud Exp $ */ +/* $NetBSD: cpu.c,v 1.72 2012/07/29 18:05:47 mlelstv Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill @@ -30,7 +30,7 @@ #include "opt_hz.h" #include -__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.71 2012/06/25 14:43:54 reinoud Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.72 2012/07/29 18:05:47 mlelstv Exp $"); #include #include @@ -451,7 +451,8 @@ cpu_rootconf(void) aprint_normal("boot device: %s\n", rdev ? device_xname(rdev) : ""); - setroot(rdev, 0); + booted_device = rdev; + rootconf(); } bool diff --git a/sys/arch/vax/vax/autoconf.c b/sys/arch/vax/vax/autoconf.c index a8a32c066dcc..eac8869ed22f 100644 --- a/sys/arch/vax/vax/autoconf.c +++ b/sys/arch/vax/vax/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.93 2011/11/10 22:33:12 njoly Exp $ */ +/* $NetBSD: autoconf.c,v 1.94 2012/07/29 18:05:47 mlelstv Exp $ */ /* * Copyright (c) 1994 Ludd, University of Lule}, Sweden. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.93 2011/11/10 22:33:12 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.94 2012/07/29 18:05:47 mlelstv Exp $"); #include "opt_compat_netbsd.h" #include "opt_cputype.h" @@ -102,7 +102,7 @@ cpu_rootconf(void) printf("boot device: %s\n", booted_device ? device_xname(booted_device) : ""); - setroot(booted_device, booted_partition); + rootconf(); } static int mainbus_print(void *, const char *); diff --git a/sys/arch/x68k/x68k/autoconf.c b/sys/arch/x68k/x68k/autoconf.c index e3becabf532d..3ff25c7e3847 100644 --- a/sys/arch/x68k/x68k/autoconf.c +++ b/sys/arch/x68k/x68k/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.66 2012/04/23 05:31:31 isaki Exp $ */ +/* $NetBSD: autoconf.c,v 1.67 2012/07/29 18:05:47 mlelstv Exp $ */ /* * Copyright (c) 1995 Leo Weppelman @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.66 2012/04/23 05:31:31 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.67 2012/07/29 18:05:47 mlelstv Exp $"); #include "opt_compat_netbsd.h" #include "scsibus.h" @@ -80,7 +80,7 @@ cpu_rootconf(void) printf("boot device: %s\n", booted_device ? device_xname(booted_device) : ""); - setroot(booted_device, booted_partition); + rootconf(); } void diff --git a/sys/arch/x86/x86/x86_autoconf.c b/sys/arch/x86/x86/x86_autoconf.c index e04c0020f6d9..479af991a272 100644 --- a/sys/arch/x86/x86/x86_autoconf.c +++ b/sys/arch/x86/x86/x86_autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: x86_autoconf.c,v 1.64 2012/07/13 16:31:49 christos Exp $ */ +/* $NetBSD: x86_autoconf.c,v 1.65 2012/07/29 18:05:47 mlelstv Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: x86_autoconf.c,v 1.64 2012/07/13 16:31:49 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: x86_autoconf.c,v 1.65 2012/07/29 18:05:47 mlelstv Exp $"); #include #include @@ -499,7 +499,7 @@ cpu_rootconf(void) aprint_normal("boot device: %s\n", booted_device ? device_xname(booted_device) : ""); - setroot(booted_device, booted_partition); + rootconf(); } void diff --git a/sys/arch/xen/x86/autoconf.c b/sys/arch/xen/x86/autoconf.c index 852f8dfe59b1..24a25cffc904 100644 --- a/sys/arch/xen/x86/autoconf.c +++ b/sys/arch/xen/x86/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.14 2012/06/10 17:05:19 mlelstv Exp $ */ +/* $NetBSD: autoconf.c,v 1.15 2012/07/29 18:05:47 mlelstv Exp $ */ /* NetBSD: autoconf.c,v 1.75 2003/12/30 12:33:22 pk Exp */ /*- @@ -45,7 +45,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.14 2012/06/10 17:05:19 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.15 2012/07/29 18:05:47 mlelstv Exp $"); #include "opt_xen.h" #include "opt_compat_oldboot.h" @@ -156,7 +156,7 @@ cpu_rootconf(void) printf("boot device: %s\n", booted_device ? device_xname(booted_device) : ""); - setroot(booted_device, booted_partition); + rootconf(); } diff --git a/sys/arch/zaurus/zaurus/autoconf.c b/sys/arch/zaurus/zaurus/autoconf.c index ab34b8b40ef8..4658563475f8 100644 --- a/sys/arch/zaurus/zaurus/autoconf.c +++ b/sys/arch/zaurus/zaurus/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.11 2012/06/13 20:04:30 mlelstv Exp $ */ +/* $NetBSD: autoconf.c,v 1.12 2012/07/29 18:05:47 mlelstv Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.11 2012/06/13 20:04:30 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.12 2012/07/29 18:05:47 mlelstv Exp $"); #include "opt_md.h" @@ -212,7 +212,7 @@ cpu_rootconf(void) aprint_normal("boot device: %s\n", booted_device ? device_xname(booted_device) : ""); - setroot(booted_device, booted_partition); + rootconf(); } void diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index 99f7ee794697..7526f5dbb0f9 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -1,4 +1,4 @@ -/* $NetBSD: init_main.c,v 1.444 2012/06/14 20:18:16 martin Exp $ */ +/* $NetBSD: init_main.c,v 1.445 2012/07/29 18:05:48 mlelstv Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -97,7 +97,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.444 2012/06/14 20:18:16 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.445 2012/07/29 18:05:48 mlelstv Exp $"); #include "opt_ddb.h" #include "opt_ipsec.h" @@ -259,7 +259,6 @@ int start_init_exec; /* semaphore for start_init() */ cprng_strong_t *kern_cprng; -static void rootconf(void); static void check_console(struct lwp *l); static void start_init(void *); static void configure(void); @@ -634,7 +633,7 @@ main(void) * Now that autoconfiguration has completed, we can determine * the root and dump devices. */ - rootconf(); + cpu_rootconf(); cpu_dumpconf(); /* Mount the root file system. */ @@ -879,15 +878,11 @@ rootconf_handle_wedges(void) } } -static void +void rootconf(void) { - cpu_rootconf(); - - if (booted_device == NULL) - return; - - rootconf_handle_wedges(); + if (booted_device != NULL) + rootconf_handle_wedges(); setroot(booted_device, booted_partition); } diff --git a/sys/sys/conf.h b/sys/sys/conf.h index 2f9a75572130..e0dd2777ffdb 100644 --- a/sys/sys/conf.h +++ b/sys/sys/conf.h @@ -1,4 +1,4 @@ -/* $NetBSD: conf.h,v 1.142 2012/07/29 10:07:10 mlelstv Exp $ */ +/* $NetBSD: conf.h,v 1.143 2012/07/29 18:05:48 mlelstv Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -266,6 +266,7 @@ void mm_init(void); #ifdef _KERNEL struct device; void setroot(struct device *, int); +void rootconf(void); void swapconf(void); #endif /* _KERNEL */