diff options
Diffstat (limited to 'contrib/sendmail/libsm/t-memstat.c')
-rw-r--r-- | contrib/sendmail/libsm/t-memstat.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/contrib/sendmail/libsm/t-memstat.c b/contrib/sendmail/libsm/t-memstat.c index b3bd918..3bfe394 100644 --- a/contrib/sendmail/libsm/t-memstat.c +++ b/contrib/sendmail/libsm/t-memstat.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2006 Sendmail, Inc. and its suppliers. + * Copyright (c) 2005-2007 Sendmail, Inc. and its suppliers. * All rights reserved. * * By using this file, you agree to the terms and conditions set @@ -8,7 +8,9 @@ */ #include <sm/gen.h> -SM_IDSTR(id, "@(#)$Id: t-memstat.c,v 1.6 2006/03/27 22:34:47 ca Exp $") +SM_IDSTR(id, "@(#)$Id: t-memstat.c,v 1.9 2007/03/14 21:41:09 ca Exp $") + +#include <sm/misc.h> /* ** Simple test program for memstat @@ -23,6 +25,18 @@ SM_IDSTR(id, "@(#)$Id: t-memstat.c,v 1.6 2006/03/27 22:34:47 ca Exp $") extern char *optarg; extern int optind; +void +usage(prg) + char *prg; +{ + fprintf(stderr, "usage: %s [options]\n", prg); + fprintf(stderr, "options:\n"); + fprintf(stderr, "-l n loop n times\n"); + fprintf(stderr, "-m n allocate n bytes per iteration\n"); + fprintf(stderr, "-r name use name as resource to query\n"); + fprintf(stderr, "-s n sleep n seconds per iteration\n"); +} + int main(argc, argv) int argc; @@ -56,7 +70,8 @@ main(argc, argv) break; default: - break; + usage(argv[0]); + exit(1); } } |