-/* init_main.c 3.3 %H% */
+/* init_main.c 3.6 %G% */
#include "../h/param.h"
#include "../h/systm.h"
proc[0].p_szpt = CLSIZE;
if (newproc(0)) {
expand(clrnd((int)btoc(szicode)), P0BR);
- VOID copyout((caddr_t)icode, (caddr_t)0, (unsigned)szicode);
+ (void) copyout((caddr_t)icode, (caddr_t)0, (unsigned)szicode);
/*
* Return goes to loc. 0 of user init
* code just copied out.
register struct buf *dp;
register int i;
struct bdevsw *bdp;
+ struct swdevt *swp;
bfreelist.b_forw = bfreelist.b_back =
bfreelist.av_forw = bfreelist.av_back = &bfreelist;
}
nblkdev++;
}
+ /*
+ * Count swap devices, and adjust total swap space available.
+ * Some of this space will not be available until a vswapon()
+ * system is issued, usually when the system goes multi-user.
+ */
+ nswdev = 0;
+ for (swp = swdevt; swp->sw_dev; swp++)
+ nswdev++;
+ if (nswdev == 0)
+ panic("binit");
+ nswap *= nswdev;
+ maxpgio *= nswdev;
+ swfree(0);
}
/*