diff options
author | charnier <charnier@FreeBSD.org> | 1997-08-07 06:46:45 +0000 |
---|---|---|
committer | charnier <charnier@FreeBSD.org> | 1997-08-07 06:46:45 +0000 |
commit | c20801fff5af6dd73e8a1fa45fd8e1c42071fd36 (patch) | |
tree | d422e77d690bd00d190a4beb16118eb595457178 /usr.bin/rsh/rsh.c | |
parent | c1ea49e6b139bc7e630843550a15670f146289fa (diff) | |
download | FreeBSD-src-c20801fff5af6dd73e8a1fa45fd8e1c42071fd36.zip FreeBSD-src-c20801fff5af6dd73e8a1fa45fd8e1c42071fd36.tar.gz |
Use err(3) instead of local definition.
Cosmetic in man page: do not start describing a flag with `The option -X ..'.
Diffstat (limited to 'usr.bin/rsh/rsh.c')
-rw-r--r-- | usr.bin/rsh/rsh.c | 34 |
1 files changed, 10 insertions, 24 deletions
diff --git a/usr.bin/rsh/rsh.c b/usr.bin/rsh/rsh.c index 70f311d..2c102a2 100644 --- a/usr.bin/rsh/rsh.c +++ b/usr.bin/rsh/rsh.c @@ -32,15 +32,17 @@ */ #ifndef lint -static char copyright[] = +static const char copyright[] = "@(#) Copyright (c) 1983, 1990, 1993, 1994\n\ The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ #ifndef lint +#if 0 static char sccsid[] = "From: @(#)rsh.c 8.3 (Berkeley) 4/6/94"; +#endif static char rcsid[] = - "$Id: rsh.c,v 1.10 1997/02/22 19:56:46 peter Exp $"; + "$Id: rsh.c,v 1.11 1997/03/29 04:31:59 imp Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -85,7 +87,6 @@ char *copyargs __P((char **)); void sendsig __P((int)); void talk __P((int, long, pid_t, int, int)); void usage __P((void)); -void warning __P(()); int main(argc, argv) @@ -209,7 +210,8 @@ main(argc, argv) sp = getservbyname((doencrypt ? "ekshell" : "kshell"), "tcp"); if (sp == NULL) { use_kerberos = 0; - warning("can't get entry for %s/tcp service", + warnx( + "warning, using standard rsh: can't get entry for %s/tcp service", doencrypt ? "ekshell" : "kshell"); } } @@ -249,9 +251,11 @@ try_connect: if (sp == NULL) errx(1, "shell/tcp: unknown service"); if (errno == ECONNREFUSED) - warning("remote host doesn't support Kerberos"); + warnx( + "warning, using standard rsh: remote host doesn't support Kerberos"); if (errno == ENOENT) - warning("can't provide Kerberos auth data"); + warnx( + "warning, using standard rsh: can't provide Kerberos auth data"); goto try_connect; } } else { @@ -437,24 +441,6 @@ sendsig(sig) (void)write(rfd2, &signo, 1); } -#ifdef KERBEROS -/* VARARGS */ -void -warning(va_alist) -va_dcl -{ - va_list ap; - char *fmt; - - (void)fprintf(stderr, "rsh: warning, using standard rsh: "); - va_start(ap); - fmt = va_arg(ap, char *); - vfprintf(stderr, fmt, ap); - va_end(ap); - (void)fprintf(stderr, ".\n"); -} -#endif - char * copyargs(argv) char **argv; |