Deleted Added
full compact
autoconf.c (975) autoconf.c (1055)
1/*-
2 * Copyright (c) 1990 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * William Jolitz.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 20 unchanged lines hidden (view full) ---

29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
36 * from: @(#)autoconf.c 7.1 (Berkeley) 5/9/91
1/*-
2 * Copyright (c) 1990 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * William Jolitz.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 20 unchanged lines hidden (view full) ---

29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
36 * from: @(#)autoconf.c 7.1 (Berkeley) 5/9/91
37 * $Id: autoconf.c,v 1.6 1993/12/19 00:49:57 wollman Exp $
37 * $Id: autoconf.c,v 1.7 1994/01/16 02:21:56 martin Exp $
38 */
39
40/*
41 * Setup the system to run on the current machine.
42 *
43 * Configure() is called at boot time and initializes the vba
44 * device tables and the memory controller monitoring. Available
45 * devices are determined (from possibilities mentioned in ioconf.c),

--- 53 unchanged lines hidden (view full) ---

99/*
100 * Configure swap space and related parameters.
101 */
102static void
103swapconf()
104{
105 register struct swdevt *swp;
106 register int nblks;
38 */
39
40/*
41 * Setup the system to run on the current machine.
42 *
43 * Configure() is called at boot time and initializes the vba
44 * device tables and the memory controller monitoring. Available
45 * devices are determined (from possibilities mentioned in ioconf.c),

--- 53 unchanged lines hidden (view full) ---

99/*
100 * Configure swap space and related parameters.
101 */
102static void
103swapconf()
104{
105 register struct swdevt *swp;
106 register int nblks;
107extern int Maxmem;
107 extern int Maxmem;
108
109 for (swp = swdevt; swp->sw_dev > 0; swp++)
110 {
111 unsigned d = major(swp->sw_dev);
112
113 if (d > nblkdev) break;
114 if (bdevsw[d].d_psize) {
115 nblks = (*bdevsw[d].d_psize)(swp->sw_dev);
116 if (nblks > 0 &&
117 (swp->sw_nblks == 0 || swp->sw_nblks > nblks))
118 swp->sw_nblks = nblks;
119 else
120 swp->sw_nblks = 0;
121 }
122 swp->sw_nblks = ctod(dtoc(swp->sw_nblks));
123 }
124 if (dumplo == 0 && bdevsw[major(dumpdev)].d_psize)
108
109 for (swp = swdevt; swp->sw_dev > 0; swp++)
110 {
111 unsigned d = major(swp->sw_dev);
112
113 if (d > nblkdev) break;
114 if (bdevsw[d].d_psize) {
115 nblks = (*bdevsw[d].d_psize)(swp->sw_dev);
116 if (nblks > 0 &&
117 (swp->sw_nblks == 0 || swp->sw_nblks > nblks))
118 swp->sw_nblks = nblks;
119 else
120 swp->sw_nblks = 0;
121 }
122 swp->sw_nblks = ctod(dtoc(swp->sw_nblks));
123 }
124 if (dumplo == 0 && bdevsw[major(dumpdev)].d_psize)
125 /*dumplo = (*bdevsw[major(dumpdev)].d_psize)(dumpdev) - physmem;*/
126 dumplo = (*bdevsw[major(dumpdev)].d_psize)(dumpdev) -
127 Maxmem*NBPG/512;
128 if (dumplo < 0)
129 dumplo = 0;
130}
131
132#define DOSWAP /* change swdevt and dumpdev */
133u_long bootdev = 0; /* should be dev_t, but not until 32 bits */

--- 68 unchanged lines hidden ---
125 dumplo = (*bdevsw[major(dumpdev)].d_psize)(dumpdev) -
126 Maxmem*NBPG/512;
127 if (dumplo < 0)
128 dumplo = 0;
129}
130
131#define DOSWAP /* change swdevt and dumpdev */
132u_long bootdev = 0; /* should be dev_t, but not until 32 bits */

--- 68 unchanged lines hidden ---