Removed evil typedef kvm_swap_t and all uses of it (not many).
Hoped for by: wollman
This commit is contained in:
parent
670aad7501
commit
3b406daf49
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)kvm.h 8.1 (Berkeley) 6/2/93
|
||||
* $Id: kvm.h,v 1.6 1998/12/16 18:59:47 bde Exp $
|
||||
* $Id: kvm.h,v 1.7 1999/01/23 04:58:35 dillon Exp $
|
||||
*/
|
||||
|
||||
#ifndef _KVM_H_
|
||||
@ -59,14 +59,14 @@ typedef struct __kvm kvm_t;
|
||||
struct kinfo_proc;
|
||||
struct proc;
|
||||
|
||||
typedef struct kvm_swap {
|
||||
struct kvm_swap {
|
||||
char ksw_devname[32];
|
||||
int ksw_used;
|
||||
int ksw_total;
|
||||
int ksw_flags;
|
||||
int ksw_reserved1;
|
||||
int ksw_reserved2;
|
||||
} *kvm_swap_t;
|
||||
};
|
||||
|
||||
#define SWIF_DUMP_TREE 0x0001
|
||||
#define SWIF_DEV_PREFIX 0x0002
|
||||
@ -76,11 +76,11 @@ int kvm_close __P((kvm_t *));
|
||||
char **kvm_getargv __P((kvm_t *, const struct kinfo_proc *, int));
|
||||
char **kvm_getenvv __P((kvm_t *, const struct kinfo_proc *, int));
|
||||
char *kvm_geterr __P((kvm_t *));
|
||||
int kvm_getloadavg __P((kvm_t *, double [], int));
|
||||
int kvm_getswapinfo __P((kvm_t *, struct kvm_swap *, int, int));
|
||||
char *kvm_getfiles __P((kvm_t *, int, int, int *));
|
||||
int kvm_getloadavg __P((kvm_t *, double [], int));
|
||||
struct kinfo_proc *
|
||||
kvm_getprocs __P((kvm_t *, int, int, int *));
|
||||
int kvm_getswapinfo __P((kvm_t *, struct kvm_swap *, int, int));
|
||||
int kvm_nlist __P((kvm_t *, struct nlist *));
|
||||
kvm_t *kvm_open
|
||||
__P((const char *, const char *, const char *, int, const char *));
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)kvm.h 8.1 (Berkeley) 6/2/93
|
||||
* $Id: kvm.h,v 1.6 1998/12/16 18:59:47 bde Exp $
|
||||
* $Id: kvm.h,v 1.7 1999/01/23 04:58:35 dillon Exp $
|
||||
*/
|
||||
|
||||
#ifndef _KVM_H_
|
||||
@ -59,14 +59,14 @@ typedef struct __kvm kvm_t;
|
||||
struct kinfo_proc;
|
||||
struct proc;
|
||||
|
||||
typedef struct kvm_swap {
|
||||
struct kvm_swap {
|
||||
char ksw_devname[32];
|
||||
int ksw_used;
|
||||
int ksw_total;
|
||||
int ksw_flags;
|
||||
int ksw_reserved1;
|
||||
int ksw_reserved2;
|
||||
} *kvm_swap_t;
|
||||
};
|
||||
|
||||
#define SWIF_DUMP_TREE 0x0001
|
||||
#define SWIF_DEV_PREFIX 0x0002
|
||||
@ -76,11 +76,11 @@ int kvm_close __P((kvm_t *));
|
||||
char **kvm_getargv __P((kvm_t *, const struct kinfo_proc *, int));
|
||||
char **kvm_getenvv __P((kvm_t *, const struct kinfo_proc *, int));
|
||||
char *kvm_geterr __P((kvm_t *));
|
||||
int kvm_getloadavg __P((kvm_t *, double [], int));
|
||||
int kvm_getswapinfo __P((kvm_t *, struct kvm_swap *, int, int));
|
||||
char *kvm_getfiles __P((kvm_t *, int, int, int *));
|
||||
int kvm_getloadavg __P((kvm_t *, double [], int));
|
||||
struct kinfo_proc *
|
||||
kvm_getprocs __P((kvm_t *, int, int, int *));
|
||||
int kvm_getswapinfo __P((kvm_t *, struct kvm_swap *, int, int));
|
||||
int kvm_nlist __P((kvm_t *, struct nlist *));
|
||||
kvm_t *kvm_open
|
||||
__P((const char *, const char *, const char *, int, const char *));
|
||||
|
@ -14,7 +14,7 @@ static const char copyright[] =
|
||||
|
||||
#ifndef lint
|
||||
static const char rcsid[] =
|
||||
"$Id: kvm_getswapinfo.c,v 1.2 1999/01/22 10:57:03 dillon Exp $";
|
||||
"$Id: kvm_getswapinfo.c,v 1.3 1999/01/25 04:07:07 dillon Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -57,8 +57,10 @@ static int unswdev;
|
||||
static int dmmax;
|
||||
static int type;
|
||||
|
||||
static void getswapinfo_old(kvm_t *kd, kvm_swap_t swap_ary, int swap_max, int flags);
|
||||
static void getswapinfo_radix(kvm_t *kd, kvm_swap_t swap_ary, int swap_max, int flags);
|
||||
static void getswapinfo_old(kvm_t *kd, struct kvm_swap *swap_ary, int swap_max,
|
||||
int flags);
|
||||
static void getswapinfo_radix(kvm_t *kd, struct kvm_swap *swap_ary,
|
||||
int swap_max, int flags);
|
||||
|
||||
#define SVAR(var) __STRING(var) /* to force expansion */
|
||||
#define KGET(idx, var) \
|
||||
@ -241,7 +243,7 @@ scanradix(
|
||||
kvm_t *kd,
|
||||
int dmmax,
|
||||
int nswdev,
|
||||
kvm_swap_t swap_ary,
|
||||
struct kvm_swap *swap_ary,
|
||||
int swap_max,
|
||||
int tab,
|
||||
int flags
|
||||
@ -398,7 +400,7 @@ scanradix(
|
||||
}
|
||||
|
||||
static void
|
||||
getswapinfo_radix(kvm_t *kd, kvm_swap_t swap_ary, int swap_max, int flags)
|
||||
getswapinfo_radix(kvm_t *kd, struct kvm_swap *swap_ary, int swap_max, int flags)
|
||||
{
|
||||
struct blist *swapblist = NULL;
|
||||
struct blist blcopy = { 0 };
|
||||
@ -432,7 +434,7 @@ getswapinfo_radix(kvm_t *kd, kvm_swap_t swap_ary, int swap_max, int flags)
|
||||
}
|
||||
|
||||
static void
|
||||
getswapinfo_old(kvm_t *kd, kvm_swap_t swap_ary, int swap_max, int flags)
|
||||
getswapinfo_old(kvm_t *kd, struct kvm_swap *swap_ary, int swap_max, int flags)
|
||||
{
|
||||
struct rlist *swapptr;
|
||||
struct rlisthdr swaplist;
|
||||
|
Loading…
Reference in New Issue
Block a user