diff options
Diffstat (limited to 'libexec/rpc.rstatd')
-rw-r--r-- | libexec/rpc.rstatd/rstat_proc.c | 45 | ||||
-rw-r--r-- | libexec/rpc.rstatd/rstatd.c | 8 |
2 files changed, 18 insertions, 35 deletions
diff --git a/libexec/rpc.rstatd/rstat_proc.c b/libexec/rpc.rstatd/rstat_proc.c index 2b63394..d1511a0 100644 --- a/libexec/rpc.rstatd/rstat_proc.c +++ b/libexec/rpc.rstatd/rstat_proc.c @@ -83,10 +83,10 @@ struct nlist nl[] = { { "" }, }; -int havedisk __P((void)); -void updatexfers __P((int, int *)); -void setup __P((void)); -int stats_service(); +int havedisk(void); +void updatexfers(int, int *); +void setup(void); +int stats_service(void); extern int from_inetd; int sincelastreq = 0; /* number of alarms since last request */ @@ -112,7 +112,7 @@ static long bsd_cp_time[CPUSTATES]; #endif void -stat_init() +stat_init(void) { stat_is_init = 1; setup(); @@ -123,9 +123,7 @@ stat_init() } statstime * -rstatproc_stats_3_svc(argp, rqstp) - void *argp; - struct svc_req *rqstp; +rstatproc_stats_3_svc(void *argp, struct svc_req *rqstp) { if (! stat_is_init) stat_init(); @@ -134,9 +132,7 @@ rstatproc_stats_3_svc(argp, rqstp) } statsswtch * -rstatproc_stats_2_svc(argp, rqstp) - void *argp; - struct svc_req *rqstp; +rstatproc_stats_2_svc(void *argp, struct svc_req *rqstp) { if (! stat_is_init) stat_init(); @@ -145,9 +141,7 @@ rstatproc_stats_2_svc(argp, rqstp) } stats * -rstatproc_stats_1_svc(argp, rqstp) - void *argp; - struct svc_req *rqstp; +rstatproc_stats_1_svc(void *argp, struct svc_req *rqstp) { if (! stat_is_init) stat_init(); @@ -156,9 +150,7 @@ rstatproc_stats_1_svc(argp, rqstp) } u_int * -rstatproc_havedisk_3_svc(argp, rqstp) - void *argp; - struct svc_req *rqstp; +rstatproc_havedisk_3_svc(void *argp, struct svc_req *rqstp) { static u_int have; @@ -170,23 +162,19 @@ rstatproc_havedisk_3_svc(argp, rqstp) } u_int * -rstatproc_havedisk_2_svc(argp, rqstp) - void *argp; - struct svc_req *rqstp; +rstatproc_havedisk_2_svc(void *argp, struct svc_req *rqstp) { return(rstatproc_havedisk_3_svc(argp, rqstp)); } u_int * -rstatproc_havedisk_1_svc(argp, rqstp) - void *argp; - struct svc_req *rqstp; +rstatproc_havedisk_1_svc(void *argp, struct svc_req *rqstp) { return(rstatproc_havedisk_3_svc(argp, rqstp)); } void -updatestat() +updatestat(void) { int i, hz; struct clockinfo clockrate; @@ -336,7 +324,7 @@ setup() * returns true if have a disk */ int -havedisk() +havedisk(void) { register int i; struct statinfo stats; @@ -379,8 +367,7 @@ havedisk() } void -updatexfers(numdevs, devs) - int numdevs, *devs; +updatexfers(int numdevs, int *devs) { register int i, j, t; struct statinfo stats; @@ -440,9 +427,7 @@ updatexfers(numdevs, devs) } void -rstat_service(rqstp, transp) - struct svc_req *rqstp; - SVCXPRT *transp; +rstat_service(struct svc_req *rqstp, SVCXPRT *transp) { union { int fill; diff --git a/libexec/rpc.rstatd/rstatd.c b/libexec/rpc.rstatd/rstatd.c index 21a0d56..35650d9 100644 --- a/libexec/rpc.rstatd/rstatd.c +++ b/libexec/rpc.rstatd/rstatd.c @@ -43,13 +43,13 @@ static const char rcsid[] = #include <rpc/pmap_clnt.h> #include <rpcsvc/rstat.h> -extern void rstat_service(); +extern void rstat_service(struct svc_req *, SVCXPRT *); int from_inetd = 1; /* started from inetd ? */ int closedown = 20; /* how long to wait before going dormant */ void -cleanup() +cleanup(int sig __unused) { (void) pmap_unset(RSTATPROG, RSTATVERS_TIME); (void) pmap_unset(RSTATPROG, RSTATVERS_SWTCH); @@ -58,9 +58,7 @@ cleanup() } int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { SVCXPRT *transp; int sock = 0; |