- ported plipconfig patches from SLE base (bnc #831310)
OBS-URL: https://build.opensuse.org/package/show/network:utilities/net-tools?expand=0&rev=40
This commit is contained in:
parent
a7ce3f1d13
commit
f122076506
63
net-tools-1.60-plipconfig-ecode.patch
Normal file
63
net-tools-1.60-plipconfig-ecode.patch
Normal file
@ -0,0 +1,63 @@
|
||||
--- net-tools-1.60/plipconfig.c.org 2012-01-09 11:44:28.000000000 +0100
|
||||
+++ net-tools-1.60/plipconfig.c 2012-01-09 11:53:30.000000000 +0100
|
||||
@@ -62,7 +62,6 @@
|
||||
{
|
||||
fprintf(stderr, _("Usage: plipconfig interface [nibble NN] [trigger NN]\n"));
|
||||
fprintf(stderr, _(" plipconfig [-V] [--version] [-h] [--help]\n"));
|
||||
- exit(-1);
|
||||
}
|
||||
|
||||
void print_plip(void)
|
||||
@@ -91,17 +90,22 @@
|
||||
while (argv[0] && *argv[0] == '-') {
|
||||
if (!strcmp(*argv, "-V") || !strcmp(*argv, "--version"))
|
||||
version();
|
||||
- else if (!strcmp(*argv, "-h") || !strcmp(*argv, "--help"))
|
||||
+ else if (!strcmp(*argv, "-h") || !strcmp(*argv, "--help")) {
|
||||
usage();
|
||||
+ exit(0);
|
||||
+ }
|
||||
else {
|
||||
usage();
|
||||
+ exit(-1);
|
||||
}
|
||||
argv++;
|
||||
argc--;
|
||||
}
|
||||
|
||||
- if (argc == 0)
|
||||
+ if (argc == 0) {
|
||||
usage();
|
||||
+ exit(-1);
|
||||
+ }
|
||||
|
||||
spp = argv;
|
||||
strncpy(ifr.ifr_name, *spp++, IFNAMSIZ);
|
||||
@@ -119,20 +123,25 @@
|
||||
}
|
||||
while (*spp != (char *) NULL) {
|
||||
if (!strcmp(*spp, "nibble")) {
|
||||
- if (*++spp == NULL)
|
||||
+ if (*++spp == NULL) {
|
||||
usage();
|
||||
+ exit(-1);
|
||||
+ }
|
||||
plip->nibble = atoi(*spp);
|
||||
spp++;
|
||||
continue;
|
||||
}
|
||||
if (!strcmp(*spp, "trigger")) {
|
||||
- if (*++spp == NULL)
|
||||
+ if (*++spp == NULL) {
|
||||
usage();
|
||||
+ exit(-1);
|
||||
+ }
|
||||
plip->trigger = atoi(*spp);
|
||||
spp++;
|
||||
continue;
|
||||
}
|
||||
usage();
|
||||
+ exit(-1);
|
||||
}
|
||||
|
||||
plip->pcmd = PLIP_SET_TIMEOUT;
|
14
net-tools-1.60-plipconfig-manpage.patch
Normal file
14
net-tools-1.60-plipconfig-manpage.patch
Normal file
@ -0,0 +1,14 @@
|
||||
--- net-tools-1.60/man/en_US/plipconfig.8.org 2011-04-13 10:03:35.135247120 +0530
|
||||
+++ net-tools-1.60/man/en_US/plipconfig.8 2011-04-13 10:25:55.615256803 +0530
|
||||
@@ -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
|
42
net-tools-1.60-plipconfig-usage.patch
Normal file
42
net-tools-1.60-plipconfig-usage.patch
Normal file
@ -0,0 +1,42 @@
|
||||
--- net-tools-1.60/plipconfig.c.org 2011-07-21 04:35:23.000000000 -0400
|
||||
+++ net-tools-1.60/plipconfig.c 2011-07-21 04:35:38.000000000 -0400
|
||||
@@ -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,8 @@ 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, _(" plipconfig -V | --version\n"));
|
||||
+ fprintf(stderr, _("Usage: plipconfig interface [nibble NN] [trigger NN]\n"));
|
||||
+ fprintf(stderr, _(" plipconfig [-V] [--version] [-h] [--help]\n"));
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
@@ -93,12 +89,13 @@ 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 if (!strcmp(*argv, "-h") || !strcmp(*argv, "--help"))
|
||||
+ usage();
|
||||
+ else {
|
||||
+ usage();
|
||||
+ }
|
||||
argv++;
|
||||
argc--;
|
||||
}
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 25 14:41:14 CEST 2013 - ms@suse.de
|
||||
|
||||
- ported plipconfig patches from SLE base (bnc #831310)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 15 13:41:34 UTC 2013 - idonmez@suse.com
|
||||
|
||||
|
@ -78,6 +78,9 @@ Patch46: net-tools-1.60-netstat_retval.diff
|
||||
Patch47: net-tools-1.60-hostname-ipv6.patch
|
||||
Patch48: net-tools-1.60-dont-trim-foreign-addr6.diff
|
||||
Patch49: net-tools-1.60-cs_CZ.bnc715580.diff
|
||||
Patch50: net-tools-1.60-plipconfig-usage.patch
|
||||
Patch51: net-tools-1.60-plipconfig-manpage.patch
|
||||
Patch52: net-tools-1.60-plipconfig-ecode.patch
|
||||
|
||||
%description
|
||||
This package contains essential programs for network administration and
|
||||
@ -141,6 +144,9 @@ cp %{S:3} lib/
|
||||
%patch47
|
||||
%patch48
|
||||
%patch49
|
||||
%patch50 -p1
|
||||
%patch51 -p1
|
||||
%patch52 -p1
|
||||
cp %{S:4} .
|
||||
cp %{S:5} ./man/en_US
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user