Fix usage in man page. Remove progname.

This commit is contained in:
Philippe Charnier 1997-10-20 12:44:53 +00:00
parent 51fc70b565
commit 40d3f8a9fc
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=30598
2 changed files with 13 additions and 15 deletions

View File

@ -33,8 +33,6 @@
.Op Fl d Ar delay
.Op Fl l Ar length
.Ar host
\&...
.Ek
.Sh DESCRIPTION
.Nm Spray
sends multiple RPC packets to
@ -65,9 +63,7 @@ rounds up to the nearest possible value.
.Nm Spray
is intended for use in network testing, measurement, and management.
This command
.Bf -emphasis
can be very hard on a network and should be used with caution.
.Ef
.Em "can be very hard on a network and should be used with caution" .
.Pp
.Sh SEE ALSO
.Xr netstat 1 ,

View File

@ -26,10 +26,13 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id$
*/
#ifndef lint
static const char rcsid[] =
"$Id$";
#endif /* not lint */
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@ -41,7 +44,7 @@
#define SPRAYOVERHEAD 86
#endif
void usage ();
static void usage ();
void print_xferstats ();
/* spray buffer */
@ -57,7 +60,6 @@ main(argc, argv)
int argc;
char **argv;
{
char *progname;
spraycumul host_stats;
sprayarr host_array;
CLIENT *cl;
@ -68,7 +70,6 @@ main(argc, argv)
int length = 0;
double xmit_time; /* time to receive data */
progname = *argv;
while ((c = getopt(argc, argv, "c:d:l:")) != -1) {
switch (c) {
case 'c':
@ -123,7 +124,7 @@ main(argc, argv)
/* create connection with server */
cl = clnt_create(*argv, SPRAYPROG, SPRAYVERS, "udp");
if (cl == NULL) {
clnt_pcreateerror(progname);
clnt_pcreateerror("spray");
exit(1);
}
@ -140,7 +141,7 @@ main(argc, argv)
/* Clear server statistics */
if (clnt_call(cl, SPRAYPROC_CLEAR, xdr_void, NULL, xdr_void, NULL, TIMEOUT) != RPC_SUCCESS) {
clnt_perror(cl, progname);
clnt_perror(cl, "spray");
exit(1);
}
@ -160,7 +161,7 @@ main(argc, argv)
/* Collect statistics from server */
if (clnt_call(cl, SPRAYPROC_GET, xdr_void, NULL, xdr_spraycumul, &host_stats, TIMEOUT) != RPC_SUCCESS) {
clnt_perror(cl, progname);
clnt_perror(cl, "spray");
exit(1);
}
@ -216,9 +217,10 @@ print_xferstats(packets, packetlen, xfertime)
}
void
static void
usage ()
{
fprintf(stderr, "usage: spray [-c count] [-l length] [-d delay] host\n");
fprintf(stderr,
"usage: spray [-c count] [-l length] [-d delay] host\n");
exit(1);
}