1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-16 10:20:30 +00:00

Updated to work with Poul-Henning's recent changes to the swap device

table.

Reviewed by:	John Dyson and David Greenman
Submitted by:	Poul-Henning Kamp
This commit is contained in:
David Greenman 1995-05-14 03:08:35 +00:00
parent a401ebbe32
commit 1295400e49
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=8505

View File

@ -1013,6 +1013,7 @@ swapmode()
long blocksize, *perdev;
struct rlist head;
struct rlist *swaplist;
u_long ptr;
KGET(VM_NSWAP, nswap);
KGET(VM_NSWDEV, nswdev);
@ -1021,7 +1022,8 @@ swapmode()
if ((sw = malloc(nswdev * sizeof(*sw))) == NULL ||
(perdev = malloc(nswdev * sizeof(*perdev))) == NULL)
err(1, "malloc");
KGET1(VM_SWDEVT, sw, nswdev * sizeof(*sw), "swdevt");
KGET1(VM_SWDEVT, &ptr, sizeof ptr, "swdevt");
KGET2(ptr, sw, nswdev * sizeof(*sw), "*swdevt");
/* Count up swap space. */
nfree = 0;