diff options
| author | Jordan K. Hubbard <jkh@FreeBSD.org> | 1997-09-15 10:19:57 +0000 |
|---|---|---|
| committer | Jordan K. Hubbard <jkh@FreeBSD.org> | 1997-09-15 10:19:57 +0000 |
| commit | 1ae21ad605d7d5db868affffb264d30118182b72 (patch) | |
| tree | 464378aa9a30811df9564e645df1e3a4212f6efb /usr.bin | |
| parent | d253a26a86fb4da73f5914a545a731a1c8235eb6 (diff) | |
Notes
Diffstat (limited to 'usr.bin')
| -rw-r--r-- | usr.bin/pr/pr.c | 2 | ||||
| -rw-r--r-- | usr.bin/printenv/printenv.c | 5 | ||||
| -rw-r--r-- | usr.bin/printf/printf.c | 7 | ||||
| -rw-r--r-- | usr.bin/quota/quota.c | 4 | ||||
| -rw-r--r-- | usr.bin/ranlib/ranlib.c | 4 | ||||
| -rw-r--r-- | usr.bin/rdist/rdist.1 | 2 | ||||
| -rw-r--r-- | usr.bin/rev/rev.c | 5 | ||||
| -rw-r--r-- | usr.bin/rlogin/rlogin.c | 4 | ||||
| -rw-r--r-- | usr.bin/rpcinfo/rpcinfo.c | 4 | ||||
| -rw-r--r-- | usr.bin/rsh/rsh.c | 4 | ||||
| -rw-r--r-- | usr.bin/rup/rup.c | 10 | ||||
| -rw-r--r-- | usr.bin/ruptime/ruptime.c | 8 | ||||
| -rw-r--r-- | usr.bin/rusers/rusers.c | 9 |
13 files changed, 38 insertions, 30 deletions
diff --git a/usr.bin/pr/pr.c b/usr.bin/pr/pr.c index cc60b51cdd45..ed729d891cb2 100644 --- a/usr.bin/pr/pr.c +++ b/usr.bin/pr/pr.c @@ -1585,7 +1585,7 @@ setup(argc, argv) } } else err = stderr; - while ((c = egetopt(argc, argv, "#adFmrte?h:i?l:n?o:s?w:")) != -1) { + while ((c = egetopt(argc, argv, "#adFmrte?h:i?l:n?o:s?w:")) != -1) { switch (c) { case '+': if ((pgnm = atoi(eoptarg)) < 1) { diff --git a/usr.bin/printenv/printenv.c b/usr.bin/printenv/printenv.c index b2499e03cfc5..cf3383774cea 100644 --- a/usr.bin/printenv/printenv.c +++ b/usr.bin/printenv/printenv.c @@ -38,7 +38,7 @@ static char copyright[] = #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)printenv.c 8.1 (Berkeley) 6/6/93"; +static char sccsid[] = "@(#)printenv.c 8.2 (Berkeley) 5/4/95"; #endif /* not lint */ #include <sys/types.h> @@ -46,6 +46,7 @@ static char sccsid[] = "@(#)printenv.c 8.1 (Berkeley) 6/6/93"; #include <stdlib.h> #include <stdio.h> #include <string.h> +#include <unistd.h> void usage __P((void)); @@ -65,7 +66,7 @@ main(argc, argv) register size_t len; int ch; - while ((ch = getopt(argc, argv, "")) != -1) + while ((ch = getopt(argc, argv, "")) != -1) switch(ch) { case '?': default: diff --git a/usr.bin/printf/printf.c b/usr.bin/printf/printf.c index 5ca15c89accf..25acd157bacb 100644 --- a/usr.bin/printf/printf.c +++ b/usr.bin/printf/printf.c @@ -33,14 +33,14 @@ #if !defined(BUILTIN) && !defined(SHELL) #ifndef lint -static char copyright[] = +static char const copyright[] = "@(#) Copyright (c) 1989, 1993\n\ The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ #endif #ifndef lint -static char sccsid[] = "@(#)printf.c 8.1 (Berkeley) 7/20/93"; +static char const sccsid[] = "@(#)printf.c 8.1 (Berkeley) 7/20/93"; #endif /* not lint */ #include <sys/types.h> @@ -51,6 +51,7 @@ static char sccsid[] = "@(#)printf.c 8.1 (Berkeley) 7/20/93"; #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <unistd.h> #ifdef SHELL #define main printfcmd @@ -100,7 +101,7 @@ main(argc, argv) int ch, end, fieldwidth, precision; char convch, nextch, *format, *fmt, *start; - while ((ch = getopt(argc, argv, "")) != -1) + while ((ch = getopt(argc, argv, "")) != -1) switch (ch) { case '?': default: diff --git a/usr.bin/quota/quota.c b/usr.bin/quota/quota.c index 721153e7f3ff..9fd27642e5aa 100644 --- a/usr.bin/quota/quota.c +++ b/usr.bin/quota/quota.c @@ -45,7 +45,7 @@ static const char copyright[] = static char sccsid[] = "from: @(#)quota.c 8.1 (Berkeley) 6/6/93"; #endif static const char rcsid[] = - "$Id: quota.c,v 1.5.2.1 1997/08/05 06:36:35 charnier Exp $"; + "$Id: quota.c,v 1.5.2.2 1997/08/29 05:29:44 imp Exp $"; #endif /* not lint */ /* @@ -118,7 +118,7 @@ main(argc, argv) int i, gflag = 0, uflag = 0; char ch; - while ((ch = getopt(argc, argv, "ugvq")) != -1) { + while ((ch = getopt(argc, argv, "ugvq")) != -1) { switch(ch) { case 'g': gflag++; diff --git a/usr.bin/ranlib/ranlib.c b/usr.bin/ranlib/ranlib.c index da3fa23bbb8d..422f66aa56df 100644 --- a/usr.bin/ranlib/ranlib.c +++ b/usr.bin/ranlib/ranlib.c @@ -45,7 +45,7 @@ static const char copyright[] = static char sccsid[] = "@(#)ranlib.c 8.1 (Berkeley) 6/6/93"; #endif static const char rcsid[] = - "$Id: ranlib.c,v 1.2.2.1 1997/08/05 06:39:14 charnier Exp $"; + "$Id: ranlib.c,v 1.2.2.2 1997/08/29 05:29:44 imp Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -72,7 +72,7 @@ main(argc, argv) int ch, eval, tflag; tflag = 0; - while ((ch = getopt(argc, argv, "t")) != -1) + while ((ch = getopt(argc, argv, "t")) != -1) switch(ch) { case 't': tflag = 1; diff --git a/usr.bin/rdist/rdist.1 b/usr.bin/rdist/rdist.1 index aec461f37495..c8d7a29cec87 100644 --- a/usr.bin/rdist/rdist.1 +++ b/usr.bin/rdist/rdist.1 @@ -125,7 +125,7 @@ Alternative program to provide .Xr rsh 1 -like transport to the remote server. It must provide a binary-transparent path to the remote server, and must have a command argument syntax that is -compatable with +compatible with .Xr rsh 1 . .It Fl d Ar var=value Define diff --git a/usr.bin/rev/rev.c b/usr.bin/rev/rev.c index a6b5468a9fb8..2f8241f24a58 100644 --- a/usr.bin/rev/rev.c +++ b/usr.bin/rev/rev.c @@ -38,7 +38,7 @@ static char copyright[] = #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)rev.c 8.2 (Berkeley) 1/2/94"; +static char sccsid[] = "@(#)rev.c 8.3 (Berkeley) 5/4/95"; #endif /* not lint */ #include <sys/types.h> @@ -48,6 +48,7 @@ static char sccsid[] = "@(#)rev.c 8.2 (Berkeley) 1/2/94"; #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <unistd.h> void usage __P((void)); @@ -61,7 +62,7 @@ main(argc, argv) size_t len; int ch, rval; - while ((ch = getopt(argc, argv, "")) != -1) + while ((ch = getopt(argc, argv, "")) != -1) switch(ch) { case '?': default: diff --git a/usr.bin/rlogin/rlogin.c b/usr.bin/rlogin/rlogin.c index 8a80d095d7c3..f066c1bf32c6 100644 --- a/usr.bin/rlogin/rlogin.c +++ b/usr.bin/rlogin/rlogin.c @@ -42,7 +42,7 @@ static const char copyright[] = static char sccsid[] = "@(#)rlogin.c 8.1 (Berkeley) 6/6/93"; #endif static const char rcsid[] = - "$Id: rlogin.c,v 1.13.2.1 1997/08/06 06:43:09 charnier Exp $"; + "$Id: rlogin.c,v 1.13.2.2 1997/08/29 05:29:46 imp Exp $"; #endif /* not lint */ /* @@ -183,7 +183,7 @@ main(argc, argv) #else #define OPTIONS "8DEKLde:l:" #endif - while ((ch = getopt(argc - argoff, argv + argoff, OPTIONS)) != -1) + while ((ch = getopt(argc - argoff, argv + argoff, OPTIONS)) != -1) switch(ch) { case '8': eight = 1; diff --git a/usr.bin/rpcinfo/rpcinfo.c b/usr.bin/rpcinfo/rpcinfo.c index 9a558d320a38..bd8945e79df8 100644 --- a/usr.bin/rpcinfo/rpcinfo.c +++ b/usr.bin/rpcinfo/rpcinfo.c @@ -2,7 +2,7 @@ /*static char sccsid[] = "from: @(#)rpcinfo.c 1.22 87/08/12 SMI";*/ /*static char sccsid[] = "from: @(#)rpcinfo.c 2.2 88/08/11 4.0 RPCSRC";*/ static char rcsid[] = - "$Id: rpcinfo.c,v 1.2.6.1 1997/08/07 06:40:11 charnier Exp $"; + "$Id: rpcinfo.c,v 1.2.6.2 1997/08/29 05:29:46 imp Exp $"; #endif /* @@ -97,7 +97,7 @@ main(argc, argv) function = NONE; portnum = 0; errflg = 0; - while ((c = getopt(argc, argv, "ptubdn:")) != -1) { + while ((c = getopt(argc, argv, "ptubdn:")) != -1) { switch (c) { case 'p': diff --git a/usr.bin/rsh/rsh.c b/usr.bin/rsh/rsh.c index 5397141401b9..5b55902b5d07 100644 --- a/usr.bin/rsh/rsh.c +++ b/usr.bin/rsh/rsh.c @@ -42,7 +42,7 @@ static const char copyright[] = static char sccsid[] = "From: @(#)rsh.c 8.3 (Berkeley) 4/6/94"; #endif static char rcsid[] = - "$Id: rsh.c,v 1.8.2.1 1997/08/08 12:02:48 charnier Exp $"; + "$Id: rsh.c,v 1.8.2.2 1997/08/29 05:29:47 imp Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -131,7 +131,7 @@ main(argc, argv) #else #define OPTIONS "8KLde:l:nt:w" #endif - while ((ch = getopt(argc - argoff, argv + argoff, OPTIONS)) != -1) + while ((ch = getopt(argc - argoff, argv + argoff, OPTIONS)) != -1) switch(ch) { case 'K': #ifdef KERBEROS diff --git a/usr.bin/rup/rup.c b/usr.bin/rup/rup.c index f7ea3e0135e6..a04257d8e2ef 100644 --- a/usr.bin/rup/rup.c +++ b/usr.bin/rup/rup.c @@ -33,7 +33,7 @@ #ifndef lint static char rcsid[] = - "$Id: rup.c,v 1.4 1995/11/21 05:43:27 wpaul Exp $"; + "$Id: rup.c,v 1.4.2.1 1997/08/08 12:06:41 charnier Exp $"; #endif /* not lint */ #include <err.h> @@ -48,7 +48,6 @@ static char rcsid[] = #include <rpc/rpc.h> #include <rpc/pmap_clnt.h> #include <arpa/inet.h> - #undef FSHIFT /* Use protocol's shift and scale values */ #undef FSCALE #include <rpcsvc/rstat.h> @@ -158,6 +157,7 @@ onehost(char *host) statstime host_stat; struct sockaddr_in addr; struct hostent *hp; + struct timeval tv; hp = gethostbyname(host); if (hp == NULL) { @@ -172,7 +172,9 @@ onehost(char *host) } bzero((char *)&host_stat, sizeof(host_stat)); - if (clnt_call(rstat_clnt, RSTATPROC_STATS, xdr_void, NULL, xdr_statstime, &host_stat, NULL) != RPC_SUCCESS) { + tv.tv_sec = 15; /* XXX ??? */ + tv.tv_usec = 0; + if (clnt_call(rstat_clnt, RSTATPROC_STATS, xdr_void, NULL, xdr_statstime, &host_stat, tv) != RPC_SUCCESS) { warnx("%s: %s", host, clnt_sperror(rstat_clnt, host)); return(-1); } @@ -190,7 +192,7 @@ allhosts() clnt_stat = clnt_broadcast(RSTATPROG, RSTATVERS_TIME, RSTATPROC_STATS, xdr_void, NULL, - xdr_statstime, &host_stat, rstat_reply); + xdr_statstime, (char *)&host_stat, rstat_reply); if (clnt_stat != RPC_SUCCESS && clnt_stat != RPC_TIMEDOUT) errx(1, "%s", clnt_sperrno(clnt_stat)); } diff --git a/usr.bin/ruptime/ruptime.c b/usr.bin/ruptime/ruptime.c index a154cd84f849..0d91a7d41737 100644 --- a/usr.bin/ruptime/ruptime.c +++ b/usr.bin/ruptime/ruptime.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. */ -/* $Id: ruptime.c,v 1.7 1996/10/23 04:23:36 scrappy Exp $ */ +/* $Id: ruptime.c,v 1.7.2.1 1997/08/29 05:29:51 imp Exp $ */ #ifndef lint static char copyright[] = @@ -96,7 +96,7 @@ main(argc, argv) aflg = 0; cmp = hscmp; - while ((ch = getopt(argc, argv, "alrut")) != -1) + while ((ch = getopt(argc, argv, "alrut")) != -1) switch (ch) { case 'a': aflg = 1; @@ -211,10 +211,10 @@ interval(tval, updown) hours %= 24; if (days) (void)snprintf(resbuf, sizeof(resbuf), - "%s %2d+%02d:%02d", updown, days, hours, minutes); + "%s %3d+%02d:%02d", updown, days, hours, minutes); else (void)snprintf(resbuf, sizeof(resbuf), - "%s %2d:%02d", updown, hours, minutes); + "%s %2d:%02d", updown, hours, minutes); return (resbuf); } diff --git a/usr.bin/rusers/rusers.c b/usr.bin/rusers/rusers.c index 5e7cf3cd3126..3cb699364b49 100644 --- a/usr.bin/rusers/rusers.c +++ b/usr.bin/rusers/rusers.c @@ -33,7 +33,7 @@ #ifndef lint static char rcsid[] = - "$Id: rusers.c,v 1.2 1995/05/30 06:33:28 rgrimes Exp $"; + "$Id: rusers.c,v 1.2.6.1 1997/08/11 07:11:24 charnier Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -176,6 +176,7 @@ onehost(char *host) CLIENT *rusers_clnt; struct sockaddr_in addr; struct hostent *hp; + struct timeval tv; hp = gethostbyname(host); if (hp == NULL) @@ -186,7 +187,9 @@ onehost(char *host) errx(1, "%s", clnt_spcreateerror("")); bzero((char *)&up, sizeof(up)); - if (clnt_call(rusers_clnt, RUSERSPROC_NAMES, xdr_void, NULL, xdr_utmpidlearr, &up, NULL) != RPC_SUCCESS) + tv.tv_sec = 15; /* XXX ?? */ + tv.tv_usec = 0; + if (clnt_call(rusers_clnt, RUSERSPROC_NAMES, xdr_void, NULL, xdr_utmpidlearr, &up, tv) != RPC_SUCCESS) errx(1, "%s", clnt_sperror(rusers_clnt, "")); addr.sin_addr.s_addr = *(int *)hp->h_addr; rusers_reply((char *)&up, &addr); @@ -201,7 +204,7 @@ allhosts() bzero((char *)&up, sizeof(up)); clnt_stat = clnt_broadcast(RUSERSPROG, RUSERSVERS_IDLE, RUSERSPROC_NAMES, xdr_void, NULL, - xdr_utmpidlearr, &up, rusers_reply); + xdr_utmpidlearr, (char *)&up, rusers_reply); if (clnt_stat != RPC_SUCCESS && clnt_stat != RPC_TIMEDOUT) errx(1, "%s", clnt_sperrno(clnt_stat)); } |
