plipconfig man page and usage output fixes. (#694766)

This commit is contained in:
Jiri Popelka 2011-04-14 13:25:45 +02:00
parent 3ecd878127
commit 416de6c03b
2 changed files with 63 additions and 1 deletions

View File

@ -0,0 +1,55 @@
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--;
}

View File

@ -1,7 +1,7 @@
Summary: Basic networking tools
Name: net-tools
Version: 1.60
Release: 116%{?dist}
Release: 117%{?dist}
License: GPL+
Group: System Environment/Base
URL: http://net-tools.berlios.de/
@ -142,6 +142,9 @@ Patch90: net-tools-1.60-ifdef-vs-if.patch
# Since Fedora 15 network devices can have arbitrary names (#682367)
Patch91: net-tools-1.60-arbitrary-device-names.patch
# plipconfig man page and usage output fixes. (#694766)
Patch92: net-tools-1.60-plipconfig.patch
BuildRequires: gettext, libselinux
BuildRequires: libselinux-devel
Requires: hostname
@ -237,6 +240,7 @@ Most of them are obsolete. For replacement check iproute package.
%patch89 -p1 -b .hfi
%patch90 -p1 -b .ifdef-vs-if
%patch91 -p1 -b .arbitrary-device-names
%patch92 -p1 -b .plipconfig
cp %SOURCE1 ./config.h
cp %SOURCE2 ./config.make
@ -336,6 +340,9 @@ rm -rf %{buildroot}
%config(noreplace) %{_sysconfdir}/ethers
%changelog
* Thu Apr 14 2011 Jiri Popelka <jpopelka@redhat.com> - 1.60-117
- plipconfig man page and usage output fixes. (#694766)
* Mon Mar 07 2011 Jiri Popelka <jpopelka@redhat.com> - 1.60-116
- Fix mii-tool/mii-diag/ether-wake to not default to eth0 because
since Fedora 15 network devices can have arbitrary names (#682367)