net-tools/net-tools-1.60-plipconfig.patch

56 lines
1.8 KiB
Diff

diff -up net-tools-1.60/man/en_US/plipconfig.8.plipconfig net-tools-1.60/man/en_US/plipconfig.8
--- net-tools-1.60/man/en_US/plipconfig.8.plipconfig 1999-01-09 17:19:58.000000000 +0100
+++ net-tools-1.60/man/en_US/plipconfig.8 2011-04-14 13:07:52.000000000 +0200
@@ -2,9 +2,9 @@
.SH NAME
plipconfig \- fine tune PLIP device parameters
.SH SYNOPSIS
-.B "plipconfig interface"
+.B "plipconfig interface [nibble NN] [trigger NN]"
.br
-.B "plipconfig interface [nibble NN] [trigger NN] [unit NN]"
+.B "plipconfig [-V] [--version] [-h] [--help]"
.SH DESCRIPTION
.B Plipconfig
is used to (hopefully) improve PLIP performance by changing the default
diff -up net-tools-1.60/plipconfig.c.plipconfig net-tools-1.60/plipconfig.c
--- net-tools-1.60/plipconfig.c.plipconfig 2001-04-08 19:04:23.000000000 +0200
+++ net-tools-1.60/plipconfig.c 2011-04-14 13:11:46.000000000 +0200
@@ -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--;
}