summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--man/en_US/plipconfig.812
-rw-r--r--plipconfig.c13
2 files changed, 14 insertions, 11 deletions
diff --git a/man/en_US/plipconfig.8 b/man/en_US/plipconfig.8
index e6f493a..d42a0bc 100644
--- a/man/en_US/plipconfig.8
+++ b/man/en_US/plipconfig.8
@@ -2,9 +2,17 @@
.SH NAME
plipconfig \- fine tune PLIP device parameters
.SH SYNOPSIS
-.B "plipconfig interface"
+.B plipconfig interface
+.RB [ nibble
+.IR NN ]
+.RB [ trigger
+.IR NN ]
.br
-.B "plipconfig interface [nibble NN] [trigger NN] [unit NN]"
+.B plipconfig
+.RB [ \-V ]
+.RB [ \-\-version ]
+.RB [ \-h ]
+.RB [ \-\-help ]
.SH DESCRIPTION
.B Plipconfig
is used to (hopefully) improve PLIP performance by changing the default
diff --git a/plipconfig.c b/plipconfig.c
index 1f972a7..01597ae 100644
--- a/plipconfig.c
+++ b/plipconfig.c
@@ -43,9 +43,6 @@
#include "net-support.h"
#include "version.h"
-int opt_a = 0;
-int opt_i = 0;
-int opt_v = 0;
int skfd = -1;
struct ifreq ifr;
@@ -63,9 +60,9 @@ static void version(void)
void usage(void)
{
- fprintf(stderr, _("Usage: plipconfig [-a] [-i] [-v] interface\n"));
- fprintf(stderr, _(" [nibble NN] [trigger NN]\n"));
+ fprintf(stderr, _("Usage: plipconfig interface [nibble NN] [trigger NN]\n"));
fprintf(stderr, _(" plipconfig -V | --version\n"));
+ fprintf(stderr, _(" plipconfig -h | --help\n"));
exit(-1);
}
@@ -93,12 +90,10 @@ int main(int argc, char **argv)
argc--;
argv++;
while (argv[0] && *argv[0] == '-') {
- if (!strcmp(*argv, "-a"))
- opt_a = 1;
- if (!strcmp(*argv, "-v"))
- opt_v = 1;
if (!strcmp(*argv, "-V") || !strcmp(*argv, "--version"))
version();
+ else
+ usage();
argv++;
argc--;
}