summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libkvm/kvm_getswapinfo.c2
-rw-r--r--sys/sys/conf.h16
-rw-r--r--sys/sys/linedisc.h16
-rw-r--r--sys/vm/swap_pager.h19
-rw-r--r--usr.sbin/pstat/pstat.c2
5 files changed, 20 insertions, 35 deletions
diff --git a/lib/libkvm/kvm_getswapinfo.c b/lib/libkvm/kvm_getswapinfo.c
index f3f72dd..d7c6d57 100644
--- a/lib/libkvm/kvm_getswapinfo.c
+++ b/lib/libkvm/kvm_getswapinfo.c
@@ -13,11 +13,11 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/time.h>
#include <sys/stat.h>
-#include <sys/conf.h>
#include <sys/blist.h>
#include <sys/sysctl.h>
#include <vm/vm_param.h>
+#include <vm/swap_pager.h>
#include <err.h>
#include <errno.h>
diff --git a/sys/sys/conf.h b/sys/sys/conf.h
index ca14498..f11cd80 100644
--- a/sys/sys/conf.h
+++ b/sys/sys/conf.h
@@ -253,22 +253,6 @@ void ldisc_deregister(int);
#define LDISC_LOAD -1 /* Loadable line discipline */
#endif /* _KERNEL */
-/*
- * Swap device table
- */
-struct swdevt {
- udev_t sw_dev; /* For quasibogus swapdev reporting */
- int sw_flags;
- int sw_nblks;
- int sw_used;
- struct vnode *sw_vp;
- dev_t sw_device;
-};
-#define SW_FREED 0x01
-#define SW_SEQUENTIAL 0x02
-#define SW_CLOSING 0x04
-#define sw_freed sw_flags /* XXX compat */
-
#ifdef _KERNEL
d_open_t noopen;
d_close_t noclose;
diff --git a/sys/sys/linedisc.h b/sys/sys/linedisc.h
index ca14498..f11cd80 100644
--- a/sys/sys/linedisc.h
+++ b/sys/sys/linedisc.h
@@ -253,22 +253,6 @@ void ldisc_deregister(int);
#define LDISC_LOAD -1 /* Loadable line discipline */
#endif /* _KERNEL */
-/*
- * Swap device table
- */
-struct swdevt {
- udev_t sw_dev; /* For quasibogus swapdev reporting */
- int sw_flags;
- int sw_nblks;
- int sw_used;
- struct vnode *sw_vp;
- dev_t sw_device;
-};
-#define SW_FREED 0x01
-#define SW_SEQUENTIAL 0x02
-#define SW_CLOSING 0x04
-#define sw_freed sw_flags /* XXX compat */
-
#ifdef _KERNEL
d_open_t noopen;
d_close_t noclose;
diff --git a/sys/vm/swap_pager.h b/sys/vm/swap_pager.h
index 23fc085..3593ed3 100644
--- a/sys/vm/swap_pager.h
+++ b/sys/vm/swap_pager.h
@@ -48,6 +48,24 @@
#define _VM_SWAP_PAGER_H_ 1
/*
+ * Swap device table
+ */
+struct swdevt {
+ udev_t sw_dev; /* For quasibogus swapdev reporting */
+ int sw_flags;
+ int sw_nblks;
+ int sw_used;
+ struct vnode *sw_vp;
+ dev_t sw_device;
+};
+#define SW_FREED 0x01
+#define SW_SEQUENTIAL 0x02
+#define SW_CLOSING 0x04
+#define sw_freed sw_flags /* XXX compat */
+
+#ifdef _KERNEL
+
+/*
* SWB_NPAGES must be a power of 2. It may be set to 1, 2, 4, 8, or 16
* pages per allocation. We recommend you stick with the default of 8.
* The 16-page limit is due to the radix code (kern/subr_blist.c).
@@ -78,7 +96,6 @@ struct swblock {
daddr_t swb_pages[SWAP_META_PAGES];
};
-#ifdef _KERNEL
extern struct pagerlst swap_pager_un_object_list;
extern int swap_pager_full;
extern struct blist *swapblist;
diff --git a/usr.sbin/pstat/pstat.c b/usr.sbin/pstat/pstat.c
index f85de47..2346bc4 100644
--- a/usr.sbin/pstat/pstat.c
+++ b/usr.sbin/pstat/pstat.c
@@ -60,11 +60,11 @@ static const char rcsid[] =
#include <sys/ioctl.h>
#include <sys/ioctl_compat.h> /* XXX NTTYDISC is too well hidden */
#include <sys/tty.h>
-#include <sys/conf.h>
#include <sys/blist.h>
#include <sys/user.h>
#include <sys/sysctl.h>
+#include <vm/swap_pager.h>
#include <err.h>
#include <fcntl.h>
OpenPOWER on IntegriCloud