de-__P() and use ANSI function declarations.
This commit is contained in:
parent
aede7f6775
commit
3f51653817
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pstat.c,v 1.90 2005/08/19 02:09:50 christos Exp $ */
|
||||
/* $NetBSD: pstat.c,v 1.91 2005/09/02 21:26:47 rpaulo Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1980, 1991, 1993, 1994
|
||||
@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1991, 1993, 1994\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)pstat.c 8.16 (Berkeley) 5/9/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: pstat.c,v 1.90 2005/08/19 02:09:50 christos Exp $");
|
||||
__RCSID("$NetBSD: pstat.c,v 1.91 2005/09/02 21:26:47 rpaulo Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -156,35 +156,33 @@ struct flagbit_desc {
|
||||
} while (/* CONSTCOND */0)
|
||||
#endif
|
||||
|
||||
void filemode __P((void));
|
||||
int getfiles __P((char **, int *, char **));
|
||||
int getflags __P((const struct flagbit_desc *, char *, u_int));
|
||||
void filemode(void);
|
||||
int getfiles(char **, int *, char **);
|
||||
int getflags(const struct flagbit_desc *, char *, u_int);
|
||||
struct mount *
|
||||
getmnt __P((struct mount *));
|
||||
char * kinfo_vnodes __P((int *));
|
||||
void layer_header __P((void));
|
||||
int layer_print __P((struct vnode *, int));
|
||||
char * loadvnodes __P((int *));
|
||||
int main __P((int, char **));
|
||||
void mount_print __P((struct mount *));
|
||||
void nfs_header __P((void));
|
||||
int nfs_print __P((struct vnode *, int));
|
||||
void ttymode __P((void));
|
||||
void ttyprt __P((struct tty *));
|
||||
void ufs_header __P((void));
|
||||
int ufs_print __P((struct vnode *, int));
|
||||
int ext2fs_print __P((struct vnode *, int));
|
||||
void union_header __P((void));
|
||||
int union_print __P((struct vnode *, int));
|
||||
void usage __P((void));
|
||||
void vnode_header __P((void));
|
||||
int vnode_print __P((struct vnode *, struct vnode *));
|
||||
void vnodemode __P((void));
|
||||
getmnt(struct mount *);
|
||||
char * kinfo_vnodes(int *);
|
||||
void layer_header(void);
|
||||
int layer_print(struct vnode *, int);
|
||||
char * loadvnodes(int *);
|
||||
int main(int, char **);
|
||||
void mount_print(struct mount *);
|
||||
void nfs_header(void);
|
||||
int nfs_print(struct vnode *, int);
|
||||
void ttymode(void);
|
||||
void ttyprt(struct tty *);
|
||||
void ufs_header(void);
|
||||
int ufs_print(struct vnode *, int);
|
||||
int ext2fs_print(struct vnode *, int);
|
||||
void union_header(void);
|
||||
int union_print(struct vnode *, int);
|
||||
void usage(void);
|
||||
void vnode_header(void);
|
||||
int vnode_print(struct vnode *, struct vnode *);
|
||||
void vnodemode(void);
|
||||
|
||||
int
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
int ch, i, quit, ret;
|
||||
int fileflag, swapflag, ttyflag, vnodeflag;
|
||||
@ -286,14 +284,13 @@ main(argc, argv)
|
||||
in hexadecimal. */
|
||||
|
||||
void
|
||||
vnodemode()
|
||||
vnodemode(void)
|
||||
{
|
||||
char *e_vnodebase, *endvnode, *evp;
|
||||
struct vnode *vp;
|
||||
struct mount *maddr, *mp;
|
||||
int numvnodes, ovflw;
|
||||
int (*vnode_fsprint)
|
||||
__P((struct vnode *, int)); /* per-fs data printer */
|
||||
int (*vnode_fsprint) (struct vnode *, int); /* per-fs data printer */
|
||||
|
||||
mp = NULL;
|
||||
e_vnodebase = loadvnodes(&numvnodes);
|
||||
@ -353,10 +350,7 @@ vnodemode()
|
||||
}
|
||||
|
||||
int
|
||||
getflags(fd, p, flags)
|
||||
const struct flagbit_desc *fd;
|
||||
char *p;
|
||||
u_int flags;
|
||||
getflags(const struct flagbit_desc *fd, char *p, u_int flags)
|
||||
{
|
||||
char *q = p;
|
||||
|
||||
@ -390,7 +384,7 @@ const struct flagbit_desc vnode_flags[] = {
|
||||
};
|
||||
|
||||
void
|
||||
vnode_header()
|
||||
vnode_header(void)
|
||||
{
|
||||
|
||||
(void)printf("%-*s TYP VFLAG USE HOLD TAG NPAGE",
|
||||
@ -398,9 +392,7 @@ vnode_header()
|
||||
}
|
||||
|
||||
int
|
||||
vnode_print(avnode, vp)
|
||||
struct vnode *avnode;
|
||||
struct vnode *vp;
|
||||
vnode_print(struct vnode *avnode, struct vnode *vp)
|
||||
{
|
||||
char *type, flags[sizeof(vnode_flags) / sizeof(vnode_flags[0])];
|
||||
int ovflw;
|
||||
@ -462,16 +454,14 @@ const struct flagbit_desc ufs_flags[] = {
|
||||
};
|
||||
|
||||
void
|
||||
ufs_header()
|
||||
ufs_header(void)
|
||||
{
|
||||
|
||||
(void)printf(" FILEID IFLAG RDEV|SZ");
|
||||
}
|
||||
|
||||
int
|
||||
ufs_print(vp, ovflw)
|
||||
struct vnode *vp;
|
||||
int ovflw;
|
||||
ufs_print(struct vnode *vp, int ovflw)
|
||||
{
|
||||
struct inode inode, *ip = &inode;
|
||||
union dinode {
|
||||
@ -518,9 +508,7 @@ ufs_print(vp, ovflw)
|
||||
}
|
||||
|
||||
int
|
||||
ext2fs_print(vp, ovflw)
|
||||
struct vnode *vp;
|
||||
int ovflw;
|
||||
ext2fs_print(struct vnode *vp, int ovflw)
|
||||
{
|
||||
struct inode inode, *ip = &inode;
|
||||
char flags[sizeof(ufs_flags) / sizeof(ufs_flags[0])];
|
||||
@ -566,16 +554,14 @@ const struct flagbit_desc nfs_flags[] = {
|
||||
};
|
||||
|
||||
void
|
||||
nfs_header()
|
||||
nfs_header(void)
|
||||
{
|
||||
|
||||
(void)printf(" FILEID NFLAG RDEV|SZ");
|
||||
}
|
||||
|
||||
int
|
||||
nfs_print(vp, ovflw)
|
||||
struct vnode *vp;
|
||||
int ovflw;
|
||||
nfs_print(struct vnode *vp, int ovflw)
|
||||
{
|
||||
struct nfsnode nfsnode, *np = &nfsnode;
|
||||
char flags[sizeof(nfs_flags) / sizeof(nfs_flags[0])];
|
||||
@ -613,16 +599,14 @@ nfs_print(vp, ovflw)
|
||||
}
|
||||
|
||||
void
|
||||
layer_header()
|
||||
layer_header(void)
|
||||
{
|
||||
|
||||
(void)printf(" %*s", PTRSTRWIDTH, "LOWER");
|
||||
}
|
||||
|
||||
int
|
||||
layer_print(vp, ovflw)
|
||||
struct vnode *vp;
|
||||
int ovflw;
|
||||
layer_print(struct vnode *vp, int ovflw)
|
||||
{
|
||||
struct layer_node lnode, *lp = &lnode;
|
||||
|
||||
@ -633,16 +617,14 @@ layer_print(vp, ovflw)
|
||||
}
|
||||
|
||||
void
|
||||
union_header()
|
||||
union_header(void)
|
||||
{
|
||||
|
||||
(void)printf(" %*s %*s", PTRSTRWIDTH, "UPPER", PTRSTRWIDTH, "LOWER");
|
||||
}
|
||||
|
||||
int
|
||||
union_print(vp, ovflw)
|
||||
struct vnode *vp;
|
||||
int ovflw;
|
||||
union_print(struct vnode *vp, int ovflw)
|
||||
{
|
||||
struct union_node unode, *up = &unode;
|
||||
|
||||
@ -658,8 +640,7 @@ union_print(vp, ovflw)
|
||||
* read it in and return a usable pointer to it.
|
||||
*/
|
||||
struct mount *
|
||||
getmnt(maddr)
|
||||
struct mount *maddr;
|
||||
getmnt(struct mount *maddr)
|
||||
{
|
||||
static struct mtab {
|
||||
struct mtab *next;
|
||||
@ -681,8 +662,7 @@ getmnt(maddr)
|
||||
}
|
||||
|
||||
void
|
||||
mount_print(mp)
|
||||
struct mount *mp;
|
||||
mount_print(struct mount *mp)
|
||||
{
|
||||
int flags;
|
||||
|
||||
@ -707,8 +687,7 @@ mount_print(mp)
|
||||
}
|
||||
|
||||
char *
|
||||
loadvnodes(avnodes)
|
||||
int *avnodes;
|
||||
loadvnodes(int *avnodes)
|
||||
{
|
||||
int mib[2];
|
||||
size_t copysize;
|
||||
@ -739,8 +718,7 @@ loadvnodes(avnodes)
|
||||
* simulate what a running kernel does in in kinfo_vnode
|
||||
*/
|
||||
char *
|
||||
kinfo_vnodes(avnodes)
|
||||
int *avnodes;
|
||||
kinfo_vnodes(int *avnodes)
|
||||
{
|
||||
struct mntlist mountlist;
|
||||
struct mount *mp, mount;
|
||||
@ -776,7 +754,7 @@ kinfo_vnodes(avnodes)
|
||||
}
|
||||
|
||||
void
|
||||
ttymode()
|
||||
ttymode(void)
|
||||
{
|
||||
int ntty;
|
||||
struct ttylist_head tty_head;
|
||||
@ -815,8 +793,7 @@ static const struct flagbit_desc ttystates[] = {
|
||||
};
|
||||
|
||||
void
|
||||
ttyprt(tp)
|
||||
struct tty *tp;
|
||||
ttyprt(struct tty *tp)
|
||||
{
|
||||
char state[sizeof(ttystates) / sizeof(ttystates[0]) + 1];
|
||||
char dev[2 + 3 + 1 + 5 + 1]; /* 12bit major + 20bit minor */
|
||||
@ -877,7 +854,7 @@ static const struct flagbit_desc filemode_flags[] = {
|
||||
};
|
||||
|
||||
void
|
||||
filemode()
|
||||
filemode(void)
|
||||
{
|
||||
struct file *fp;
|
||||
struct file *addr;
|
||||
@ -930,10 +907,7 @@ filemode()
|
||||
}
|
||||
|
||||
int
|
||||
getfiles(abuf, alen, aoffset)
|
||||
char **abuf;
|
||||
int *alen;
|
||||
char **aoffset;
|
||||
getfiles(char **abuf, int *alen, char **aoffset)
|
||||
{
|
||||
size_t len;
|
||||
int mib[2];
|
||||
@ -968,7 +942,7 @@ getfiles(abuf, alen, aoffset)
|
||||
}
|
||||
|
||||
void
|
||||
usage()
|
||||
usage(void)
|
||||
{
|
||||
|
||||
(void)fprintf(stderr,
|
||||
|
Loading…
Reference in New Issue
Block a user