diff options
author | phk <phk@FreeBSD.org> | 2003-07-31 21:42:12 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-07-31 21:42:12 +0000 |
commit | 065d723b505edfc2c76e7460b26000be0937b2a5 (patch) | |
tree | 6160f8065328f044e0f971bd86918736a3928e46 /lib | |
parent | f51993282f22db4dd9cfd1a41ec857da50ff1828 (diff) | |
download | FreeBSD-src-065d723b505edfc2c76e7460b26000be0937b2a5.zip FreeBSD-src-065d723b505edfc2c76e7460b26000be0937b2a5.tar.gz |
Remove various unused variables, prototypes and local variables.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libkvm/kvm_getswapinfo.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/lib/libkvm/kvm_getswapinfo.c b/lib/libkvm/kvm_getswapinfo.c index b9c3307..8822851 100644 --- a/lib/libkvm/kvm_getswapinfo.c +++ b/lib/libkvm/kvm_getswapinfo.c @@ -38,36 +38,12 @@ __FBSDID("$FreeBSD$"); #define NL_DMMAX 3 static int kvm_swap_nl_cached = 0; -static int nswdev; static int unswdev; /* number of found swap dev's */ static int dmmax; -static int kvm_getswapinfo2(kvm_t *kd, struct kvm_swap *swap_ary, - int swap_max, int flags); -static int kvm_getswapinfo_kvm(kvm_t *, struct kvm_swap *, int, int); static int kvm_getswapinfo_sysctl(kvm_t *, struct kvm_swap *, int, int); static int getsysctl(kvm_t *, char *, void *, size_t); -#define SVAR(var) __STRING(var) /* to force expansion */ -#define KGET(idx, var) \ - KGET1(idx, &var, sizeof(var), SVAR(var)) -#define KGET1(idx, p, s, msg) \ - KGET2(kvm_swap_nl[idx].n_value, p, s, msg) -#define KGET2(addr, p, s, msg) \ - if (kvm_read(kd, (u_long)(addr), p, s) != s) \ - warnx("cannot read %s: %s", msg, kvm_geterr(kd)) -#define KGETN(idx, var) \ - KGET1N(idx, &var, sizeof(var), SVAR(var)) -#define KGET1N(idx, p, s, msg) \ - KGET2N(kvm_swap_nl[idx].n_value, p, s, msg) -#define KGET2N(addr, p, s, msg) \ - ((kvm_read(kd, (u_long)(addr), p, s) == s) ? 1 : 0) -#define KGETRET(addr, p, s, msg) \ - if (kvm_read(kd, (u_long)(addr), p, s) != s) { \ - warnx("cannot read %s: %s", msg, kvm_geterr(kd)); \ - return (0); \ - } - #define GETSWDEVNAME(dev, str, flags) \ if (dev == NODEV) { \ strlcpy(str, "[NFS swap]", sizeof(str)); \ @@ -86,7 +62,6 @@ kvm_getswapinfo( int swap_max, int flags ) { - int rv; /* * clear cache |