From 87a858d545f37c808cc22343f075241e15fee343 Mon Sep 17 00:00:00 2001 From: tmm Date: Fri, 1 Jun 2001 22:53:10 +0000 Subject: Change the way information about swap devices is exported to be more canonical: define a versioned struct xswdev, and add a sysctl node handler that allows the user to get this structure for a certain device index by specifying this index as last element of the MIB. This new node handler, vm.swap_info, replaces the old vm.nswapdev and vm.swapdevX.* (where X was the index) sysctls. --- sys/vm/vm_param.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'sys/vm/vm_param.h') diff --git a/sys/vm/vm_param.h b/sys/vm/vm_param.h index a0809fe..7237638 100644 --- a/sys/vm/vm_param.h +++ b/sys/vm/vm_param.h @@ -105,6 +105,18 @@ } /* + * Structure for swap device statistics + */ +#define XSWDEV_VERSION 1 +struct xswdev { + u_int xsw_version; + udev_t xsw_dev; + int xsw_flags; + int xsw_nblks; + int xsw_used; +}; + +/* * Return values from the VM routines. */ #define KERN_SUCCESS 0 -- cgit v1.1