X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/143f81a884908a0dff3e6660dfdcc4d0a145d645..41888f1633c1339d2f01b12ee2799c96530262dd:/usr/src/sys/kern/init_main.c?ds=inline diff --git a/usr/src/sys/kern/init_main.c b/usr/src/sys/kern/init_main.c index 982a64de6e..78338a33b2 100644 --- a/usr/src/sys/kern/init_main.c +++ b/usr/src/sys/kern/init_main.c @@ -1,4 +1,4 @@ -/* init_main.c 3.3 %H% */ +/* init_main.c 3.6 %G% */ #include "../h/param.h" #include "../h/systm.h" @@ -105,7 +105,7 @@ main(firstaddr) 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. @@ -179,6 +179,7 @@ binit() 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; @@ -201,6 +202,19 @@ binit() } 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); } /*