-/* $OpenBSD: vm_param.h,v 1.7 1996/10/23 15:38:38 deraadt Exp $ */
+/* $OpenBSD: vm_param.h,v 1.8 1997/04/10 13:48:50 deraadt Exp $ */
/* $NetBSD: vm_param.h,v 1.12 1995/03/26 20:39:16 jtc Exp $ */
/*
void *val;
};
+#define SWAPSKIPBYTES 8192 /* never use at the start of a swap space */
+
/*
* Return values from the VM routines.
*/
-/* $OpenBSD: vm_swap.c,v 1.3 1997/02/17 07:38:20 mickey Exp $ */
+/* $OpenBSD: vm_swap.c,v 1.4 1997/04/10 13:48:51 deraadt Exp $ */
/* $NetBSD: vm_swap.c,v 1.32 1996/02/05 01:54:09 christos Exp $ */
/*
* Don't use the first cluster of the device
* in case it starts with a label or boot block.
*/
- rminit(swapmap, blk - ctod(CLSIZE),
- vsbase + ctod(CLSIZE), "swap", nswapmap);
+ rminit(swapmap, blk - ctod(btoc(SWAPSKIPBYTES)),
+ vsbase + ctod(btoc(SWAPSKIPBYTES)), "swap", nswapmap);
} else if (dvbase == 0) {
/*
* Don't use the first cluster of the device
* in case it starts with a label or boot block.
*/
- rmfree(swapmap, blk - ctod(CLSIZE),
- vsbase + ctod(CLSIZE));
+ rmfree(swapmap, blk - ctod(btoc(SWAPSKIPBYTES)),
+ vsbase + ctod(btoc(SWAPSKIPBYTES)));
} else
rmfree(swapmap, blk, vsbase);
}