=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/ssh-keyscan.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- src/usr.bin/ssh/ssh-keyscan.c 2000/12/06 19:57:48 1.2 +++ src/usr.bin/ssh/ssh-keyscan.c 2000/12/12 22:30:01 1.3 @@ -8,7 +8,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh-keyscan.c,v 1.2 2000/12/06 19:57:48 markus Exp $"); +RCSID("$OpenBSD: ssh-keyscan.c,v 1.3 2000/12/12 22:30:01 markus Exp $"); #include #include @@ -36,7 +36,7 @@ int maxfd; #define maxcon (maxfd - 10) -char *prog; +extern char *__progname; fd_set read_wait; int ncon; @@ -540,7 +540,7 @@ static void usage(void) { - fatal("usage: %s [-t timeout] { [--] host | -f file } ...\n", prog); + fatal("usage: %s [-t timeout] { [--] host | -f file } ...\n", __progname); return; } @@ -551,11 +551,6 @@ TAILQ_INIT(&tq); - if ((prog = strrchr(argv[0], '/'))) - prog++; - else - prog = argv[0]; - if (argc <= argno) usage(); @@ -576,11 +571,11 @@ maxfd = fdlim_get(1); if (maxfd < 0) - fatal("%s: fdlim_get: bad value\n", prog); + fatal("%s: fdlim_get: bad value\n", __progname); if (maxfd > MAXMAXFD) maxfd = MAXMAXFD; if (maxcon <= 0) - fatal("%s: not enough file descriptors\n", prog); + fatal("%s: not enough file descriptors\n", __progname); if (maxfd > fdlim_get(0)) fdlim_set(maxfd); fdcon = xmalloc(maxfd * sizeof(con));