Make these programs compile and work correctly now that /usr/include/rpcsvc
has been ANSI-fied. Pointed out by: bde
This commit is contained in:
parent
e2e26133df
commit
e4a0e42ba8
@ -33,7 +33,7 @@ static char sccsid[] = "from: @(#)rpc.rstatd.c 1.1 86/09/25 Copyr 1984 Sun Micro
|
|||||||
static char sccsid[] = "from: @(#)rstat_proc.c 2.2 88/08/01 4.0 RPCSRC";
|
static char sccsid[] = "from: @(#)rstat_proc.c 2.2 88/08/01 4.0 RPCSRC";
|
||||||
#endif
|
#endif
|
||||||
static const char rcsid[] =
|
static const char rcsid[] =
|
||||||
"$Id: rstat_proc.c,v 1.8 1997/11/26 07:34:55 charnier Exp $";
|
"$Id: rstat_proc.c,v 1.9 1998/01/07 07:50:59 charnier Exp $";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -122,7 +122,9 @@ stat_init()
|
|||||||
}
|
}
|
||||||
|
|
||||||
statstime *
|
statstime *
|
||||||
rstatproc_stats_3()
|
rstatproc_stats_3_svc(argp, rqstp)
|
||||||
|
void *argp;
|
||||||
|
struct svc_req *rqstp;
|
||||||
{
|
{
|
||||||
if (! stat_is_init)
|
if (! stat_is_init)
|
||||||
stat_init();
|
stat_init();
|
||||||
@ -131,7 +133,9 @@ rstatproc_stats_3()
|
|||||||
}
|
}
|
||||||
|
|
||||||
statsswtch *
|
statsswtch *
|
||||||
rstatproc_stats_2()
|
rstatproc_stats_2_svc(argp, rqstp)
|
||||||
|
void *argp;
|
||||||
|
struct svc_req *rqstp;
|
||||||
{
|
{
|
||||||
if (! stat_is_init)
|
if (! stat_is_init)
|
||||||
stat_init();
|
stat_init();
|
||||||
@ -140,7 +144,9 @@ rstatproc_stats_2()
|
|||||||
}
|
}
|
||||||
|
|
||||||
stats *
|
stats *
|
||||||
rstatproc_stats_1()
|
rstatproc_stats_1_svc(argp, rqstp)
|
||||||
|
void *argp;
|
||||||
|
struct svc_req *rqstp;
|
||||||
{
|
{
|
||||||
if (! stat_is_init)
|
if (! stat_is_init)
|
||||||
stat_init();
|
stat_init();
|
||||||
@ -149,7 +155,9 @@ rstatproc_stats_1()
|
|||||||
}
|
}
|
||||||
|
|
||||||
u_int *
|
u_int *
|
||||||
rstatproc_havedisk_3()
|
rstatproc_havedisk_3_svc(argp, rqstp)
|
||||||
|
void *argp;
|
||||||
|
struct svc_req *rqstp;
|
||||||
{
|
{
|
||||||
static u_int have;
|
static u_int have;
|
||||||
|
|
||||||
@ -161,15 +169,19 @@ rstatproc_havedisk_3()
|
|||||||
}
|
}
|
||||||
|
|
||||||
u_int *
|
u_int *
|
||||||
rstatproc_havedisk_2()
|
rstatproc_havedisk_2_svc(argp, rqstp)
|
||||||
|
void *argp;
|
||||||
|
struct svc_req *rqstp;
|
||||||
{
|
{
|
||||||
return(rstatproc_havedisk_3());
|
return(rstatproc_havedisk_3_svc(argp, rqstp));
|
||||||
}
|
}
|
||||||
|
|
||||||
u_int *
|
u_int *
|
||||||
rstatproc_havedisk_1()
|
rstatproc_havedisk_1_svc(argp, rqstp)
|
||||||
|
void *argp;
|
||||||
|
struct svc_req *rqstp;
|
||||||
{
|
{
|
||||||
return(rstatproc_havedisk_3());
|
return(rstatproc_havedisk_3_svc(argp, rqstp));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -362,13 +374,13 @@ rstat_service(rqstp, transp)
|
|||||||
xdr_result = xdr_statstime;
|
xdr_result = xdr_statstime;
|
||||||
switch (rqstp->rq_vers) {
|
switch (rqstp->rq_vers) {
|
||||||
case RSTATVERS_ORIG:
|
case RSTATVERS_ORIG:
|
||||||
local = (char *(*)()) rstatproc_stats_1;
|
local = (char *(*)()) rstatproc_stats_1_svc;
|
||||||
break;
|
break;
|
||||||
case RSTATVERS_SWTCH:
|
case RSTATVERS_SWTCH:
|
||||||
local = (char *(*)()) rstatproc_stats_2;
|
local = (char *(*)()) rstatproc_stats_2_svc;
|
||||||
break;
|
break;
|
||||||
case RSTATVERS_TIME:
|
case RSTATVERS_TIME:
|
||||||
local = (char *(*)()) rstatproc_stats_3;
|
local = (char *(*)()) rstatproc_stats_3_svc;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
svcerr_progvers(transp, RSTATVERS_ORIG, RSTATVERS_TIME);
|
svcerr_progvers(transp, RSTATVERS_ORIG, RSTATVERS_TIME);
|
||||||
@ -382,13 +394,13 @@ rstat_service(rqstp, transp)
|
|||||||
xdr_result = xdr_u_int;
|
xdr_result = xdr_u_int;
|
||||||
switch (rqstp->rq_vers) {
|
switch (rqstp->rq_vers) {
|
||||||
case RSTATVERS_ORIG:
|
case RSTATVERS_ORIG:
|
||||||
local = (char *(*)()) rstatproc_havedisk_1;
|
local = (char *(*)()) rstatproc_havedisk_1_svc;
|
||||||
break;
|
break;
|
||||||
case RSTATVERS_SWTCH:
|
case RSTATVERS_SWTCH:
|
||||||
local = (char *(*)()) rstatproc_havedisk_2;
|
local = (char *(*)()) rstatproc_havedisk_2_svc;
|
||||||
break;
|
break;
|
||||||
case RSTATVERS_TIME:
|
case RSTATVERS_TIME:
|
||||||
local = (char *(*)()) rstatproc_havedisk_3;
|
local = (char *(*)()) rstatproc_havedisk_3_svc;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
svcerr_progvers(transp, RSTATVERS_ORIG, RSTATVERS_TIME);
|
svcerr_progvers(transp, RSTATVERS_ORIG, RSTATVERS_TIME);
|
||||||
@ -402,7 +414,7 @@ rstat_service(rqstp, transp)
|
|||||||
goto leave;
|
goto leave;
|
||||||
}
|
}
|
||||||
bzero((char *)&argument, sizeof(argument));
|
bzero((char *)&argument, sizeof(argument));
|
||||||
if (!svc_getargs(transp, xdr_argument, &argument)) {
|
if (!svc_getargs(transp, xdr_argument, (caddr_t)&argument)) {
|
||||||
svcerr_decode(transp);
|
svcerr_decode(transp);
|
||||||
goto leave;
|
goto leave;
|
||||||
}
|
}
|
||||||
@ -410,7 +422,7 @@ rstat_service(rqstp, transp)
|
|||||||
if (result != NULL && !svc_sendreply(transp, xdr_result, result)) {
|
if (result != NULL && !svc_sendreply(transp, xdr_result, result)) {
|
||||||
svcerr_systemerr(transp);
|
svcerr_systemerr(transp);
|
||||||
}
|
}
|
||||||
if (!svc_freeargs(transp, xdr_argument, &argument))
|
if (!svc_freeargs(transp, xdr_argument, (caddr_t)&argument))
|
||||||
errx(1, "unable to free arguments");
|
errx(1, "unable to free arguments");
|
||||||
leave:
|
leave:
|
||||||
if (from_inetd)
|
if (from_inetd)
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static const char rcsid[] =
|
static const char rcsid[] =
|
||||||
"$Id: rusers_proc.c,v 1.7 1997/11/26 07:36:50 charnier Exp $";
|
"$Id: rusers_proc.c,v 1.8 1998/01/07 07:54:17 charnier Exp $";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
@ -287,25 +287,33 @@ do_names_1(int all)
|
|||||||
}
|
}
|
||||||
|
|
||||||
utmpidlearr *
|
utmpidlearr *
|
||||||
rusersproc_names_2()
|
rusersproc_names_2_svc(argp, rqstp)
|
||||||
|
void *argp;
|
||||||
|
struct svc_req *rqstp;
|
||||||
{
|
{
|
||||||
return(do_names_2(0));
|
return(do_names_2(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
utmpidlearr *
|
utmpidlearr *
|
||||||
rusersproc_allnames_2()
|
rusersproc_allnames_2_svc(argp, rqstp)
|
||||||
|
void *argp;
|
||||||
|
struct svc_req *rqstp;
|
||||||
{
|
{
|
||||||
return(do_names_2(1));
|
return(do_names_2(1));
|
||||||
}
|
}
|
||||||
|
|
||||||
utmparr *
|
utmparr *
|
||||||
rusersproc_names_1()
|
rusersproc_names_1_svc(argp, rqstp)
|
||||||
|
void *argp;
|
||||||
|
struct svc_req *rqstp;
|
||||||
{
|
{
|
||||||
return(do_names_1(0));
|
return(do_names_1(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
utmparr *
|
utmparr *
|
||||||
rusersproc_allnames_1()
|
rusersproc_allnames_1_svc(argp, rqstp)
|
||||||
|
void *argp;
|
||||||
|
struct svc_req *rqstp;
|
||||||
{
|
{
|
||||||
return(do_names_1(1));
|
return(do_names_1(1));
|
||||||
}
|
}
|
||||||
@ -338,10 +346,10 @@ rusers_service(rqstp, transp)
|
|||||||
xdr_result = xdr_utmpidlearr;
|
xdr_result = xdr_utmpidlearr;
|
||||||
switch (rqstp->rq_vers) {
|
switch (rqstp->rq_vers) {
|
||||||
case RUSERSVERS_ORIG:
|
case RUSERSVERS_ORIG:
|
||||||
local = (char *(*)()) rusersproc_names_1;
|
local = (char *(*)()) rusersproc_names_1_svc;
|
||||||
break;
|
break;
|
||||||
case RUSERSVERS_IDLE:
|
case RUSERSVERS_IDLE:
|
||||||
local = (char *(*)()) rusersproc_names_2;
|
local = (char *(*)()) rusersproc_names_2_svc;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
svcerr_progvers(transp, RUSERSVERS_ORIG, RUSERSVERS_IDLE);
|
svcerr_progvers(transp, RUSERSVERS_ORIG, RUSERSVERS_IDLE);
|
||||||
@ -355,10 +363,10 @@ rusers_service(rqstp, transp)
|
|||||||
xdr_result = xdr_utmpidlearr;
|
xdr_result = xdr_utmpidlearr;
|
||||||
switch (rqstp->rq_vers) {
|
switch (rqstp->rq_vers) {
|
||||||
case RUSERSVERS_ORIG:
|
case RUSERSVERS_ORIG:
|
||||||
local = (char *(*)()) rusersproc_allnames_1;
|
local = (char *(*)()) rusersproc_allnames_1_svc;
|
||||||
break;
|
break;
|
||||||
case RUSERSVERS_IDLE:
|
case RUSERSVERS_IDLE:
|
||||||
local = (char *(*)()) rusersproc_allnames_2;
|
local = (char *(*)()) rusersproc_allnames_2_svc;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
svcerr_progvers(transp, RUSERSVERS_ORIG, RUSERSVERS_IDLE);
|
svcerr_progvers(transp, RUSERSVERS_ORIG, RUSERSVERS_IDLE);
|
||||||
@ -372,7 +380,7 @@ rusers_service(rqstp, transp)
|
|||||||
goto leave;
|
goto leave;
|
||||||
}
|
}
|
||||||
bzero((char *)&argument, sizeof(argument));
|
bzero((char *)&argument, sizeof(argument));
|
||||||
if (!svc_getargs(transp, xdr_argument, &argument)) {
|
if (!svc_getargs(transp, xdr_argument, (caddr_t)&argument)) {
|
||||||
svcerr_decode(transp);
|
svcerr_decode(transp);
|
||||||
goto leave;
|
goto leave;
|
||||||
}
|
}
|
||||||
@ -380,7 +388,7 @@ rusers_service(rqstp, transp)
|
|||||||
if (result != NULL && !svc_sendreply(transp, xdr_result, result)) {
|
if (result != NULL && !svc_sendreply(transp, xdr_result, result)) {
|
||||||
svcerr_systemerr(transp);
|
svcerr_systemerr(transp);
|
||||||
}
|
}
|
||||||
if (!svc_freeargs(transp, xdr_argument, &argument)) {
|
if (!svc_freeargs(transp, xdr_argument, (caddr_t)&argument)) {
|
||||||
syslog(LOG_ERR, "unable to free arguments");
|
syslog(LOG_ERR, "unable to free arguments");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static const char rcsid[] =
|
static const char rcsid[] =
|
||||||
"$Id$";
|
"$Id: rwalld.c,v 1.6 1997/12/02 12:20:17 charnier Exp $";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include <err.h>
|
#include <err.h>
|
||||||
@ -152,9 +152,12 @@ void killkids()
|
|||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *wallproc_wall_1(s)
|
void *wallproc_wall_1_svc(s, rqstp)
|
||||||
char **s;
|
wrapstring *s;
|
||||||
|
struct svc_req *rqstp;
|
||||||
{
|
{
|
||||||
|
static void *dummy = NULL;
|
||||||
|
|
||||||
/* fork, popen wall with special option, and send the message */
|
/* fork, popen wall with special option, and send the message */
|
||||||
if (fork() == 0) {
|
if (fork() == 0) {
|
||||||
FILE *pfp;
|
FILE *pfp;
|
||||||
@ -166,7 +169,7 @@ void *wallproc_wall_1(s)
|
|||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return(NULL);
|
return(&dummy);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -189,7 +192,7 @@ wallprog_1(rqstp, transp)
|
|||||||
case WALLPROC_WALL:
|
case WALLPROC_WALL:
|
||||||
xdr_argument = xdr_wrapstring;
|
xdr_argument = xdr_wrapstring;
|
||||||
xdr_result = xdr_void;
|
xdr_result = xdr_void;
|
||||||
local = (char *(*)()) wallproc_wall_1;
|
local = (char *(*)()) wallproc_wall_1_svc;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -197,7 +200,7 @@ wallprog_1(rqstp, transp)
|
|||||||
goto leave;
|
goto leave;
|
||||||
}
|
}
|
||||||
bzero((char *)&argument, sizeof(argument));
|
bzero((char *)&argument, sizeof(argument));
|
||||||
if (!svc_getargs(transp, xdr_argument, &argument)) {
|
if (!svc_getargs(transp, xdr_argument, (caddr_t)&argument)) {
|
||||||
svcerr_decode(transp);
|
svcerr_decode(transp);
|
||||||
goto leave;
|
goto leave;
|
||||||
}
|
}
|
||||||
@ -205,7 +208,7 @@ wallprog_1(rqstp, transp)
|
|||||||
if (result != NULL && !svc_sendreply(transp, xdr_result, result)) {
|
if (result != NULL && !svc_sendreply(transp, xdr_result, result)) {
|
||||||
svcerr_systemerr(transp);
|
svcerr_systemerr(transp);
|
||||||
}
|
}
|
||||||
if (!svc_freeargs(transp, xdr_argument, &argument)) {
|
if (!svc_freeargs(transp, xdr_argument, (caddr_t)&argument)) {
|
||||||
syslog(LOG_ERR, "unable to free arguments");
|
syslog(LOG_ERR, "unable to free arguments");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user