Accepting request 23746 from home:coolo:branches:openSUSE:Factory:branched

Copy from home:coolo:branches:openSUSE:Factory:branched/net-tools via accept of submit request 23746 revision 2.
Request was accepted with message:
thanks

OBS-URL: https://build.opensuse.org/request/show/23746
OBS-URL: https://build.opensuse.org/package/show/network:utilities/net-tools?expand=0&rev=13
This commit is contained in:
Pavol Rusnak 2009-11-04 10:08:51 +00:00 committed by Git OBS Bridge
parent b86f544e34
commit efc5182a49
4 changed files with 60 additions and 46 deletions

View File

@ -2,10 +2,11 @@
# This Patch fixes the -ic option from netstat
# without destroying the proc_read buffer function
# if any questions occur contact my at fdg@suse.de
diff -uNr net-tools-1.60-unpatched/ifconfig.c net-tools-1.60/ifconfig.c
--- net-tools-1.60-unpatched/ifconfig.c 2001-04-13 20:25:18.000000000 +0200
+++ net-tools-1.60/ifconfig.c 2004-07-30 11:49:21.735995630 +0200
@@ -108,7 +108,7 @@
Index: net-tools-1.60/ifconfig.c
===================================================================
--- net-tools-1.60.orig/ifconfig.c
+++ net-tools-1.60/ifconfig.c
@@ -108,7 +108,7 @@ static int if_print(char *ifname)
printf(_("Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg\n"));
if (!ifname) {
@ -14,7 +15,7 @@ diff -uNr net-tools-1.60-unpatched/ifconfig.c net-tools-1.60/ifconfig.c
} else {
struct interface *ife;
@@ -1081,7 +1081,7 @@
@@ -1081,7 +1081,7 @@ static int set_ifstate(char *parent, uns
pt.flag = flag;
memset(searcher, 0, sizeof(searcher));
i = for_all_interfaces((int (*)(struct interface *,void *))do_ifcmd,
@ -23,10 +24,11 @@ diff -uNr net-tools-1.60-unpatched/ifconfig.c net-tools-1.60/ifconfig.c
if (i == -1)
return -1;
if (i == 1)
diff -uNr net-tools-1.60-unpatched/include/interface.h net-tools-1.60/include/interface.h
--- net-tools-1.60-unpatched/include/interface.h 2004-07-30 11:01:42.000000000 +0200
+++ net-tools-1.60/include/interface.h 2004-07-30 12:13:58.028172544 +0200
@@ -63,10 +63,10 @@
Index: net-tools-1.60/include/interface.h
===================================================================
--- net-tools-1.60.orig/include/interface.h
+++ net-tools-1.60/include/interface.h
@@ -63,10 +63,10 @@ struct interface {
extern int if_fetch(struct interface *ife);
@ -39,7 +41,7 @@ diff -uNr net-tools-1.60-unpatched/include/interface.h net-tools-1.60/include/in
extern int do_if_fetch(struct interface *ife);
extern int do_if_print(struct interface *ife, void *cookie);
@@ -76,6 +76,8 @@
@@ -76,6 +76,8 @@ extern void ife_print(struct interface *
extern int ife_short;
extern const char *if_port_text[][4];
@ -48,10 +50,11 @@ diff -uNr net-tools-1.60-unpatched/include/interface.h net-tools-1.60/include/in
/* Defines for poor glibc2.0 users, the feature check is done at runtime */
#if !defined(SIOCSIFTXQLEN)
diff -uNr net-tools-1.60-unpatched/lib/interface.c net-tools-1.60/lib/interface.c
--- net-tools-1.60-unpatched/lib/interface.c 2004-07-30 11:01:42.000000000 +0200
+++ net-tools-1.60/lib/interface.c 2004-07-30 12:01:59.537031709 +0200
@@ -89,7 +89,7 @@
Index: net-tools-1.60/lib/interface.c
===================================================================
--- net-tools-1.60.orig/lib/interface.c
+++ net-tools-1.60/lib/interface.c
@@ -90,7 +90,7 @@ int ife_field = 5;
static struct interface *int_list, *int_last;
@ -60,7 +63,7 @@ diff -uNr net-tools-1.60-unpatched/lib/interface.c net-tools-1.60/lib/interface.
static struct interface *add_interface(char *name)
{
@@ -119,17 +119,17 @@
@@ -120,17 +120,17 @@ struct interface *lookup_interface(char
{
struct interface *ife = NULL;
@ -81,7 +84,7 @@ diff -uNr net-tools-1.60-unpatched/lib/interface.c net-tools-1.60/lib/interface.
return -1;
for (ife = int_list; ife; ife = ife->next) {
int err = doit(ife, cookie);
@@ -145,6 +145,7 @@
@@ -162,6 +162,7 @@ int free_interface_list(void)
while ((ife = int_list) != NULL) {
int_list = ife->next;
free(ife);
@ -89,7 +92,7 @@ diff -uNr net-tools-1.60-unpatched/lib/interface.c net-tools-1.60/lib/interface.
}
return 0;
}
@@ -298,7 +299,7 @@
@@ -315,7 +316,7 @@ static int get_dev_fields(char *bp, stru
return 0;
}
@ -98,7 +101,7 @@ diff -uNr net-tools-1.60-unpatched/lib/interface.c net-tools-1.60/lib/interface.
{
static int proc_read;
FILE *fh;
@@ -306,10 +307,12 @@
@@ -323,10 +324,12 @@ static int if_readlist_proc(char *target
struct interface *ife;
int err;
@ -115,7 +118,7 @@ diff -uNr net-tools-1.60-unpatched/lib/interface.c net-tools-1.60/lib/interface.
fh = fopen(_PATH_PROCNET_DEV, "r");
if (!fh) {
@@ -369,9 +372,9 @@
@@ -386,9 +389,9 @@ static int if_readlist_proc(char *target
return err;
}
@ -127,7 +130,7 @@ diff -uNr net-tools-1.60-unpatched/lib/interface.c net-tools-1.60/lib/interface.
if (!err)
err = if_readconf();
return err;
@@ -891,3 +894,26 @@
@@ -910,3 +913,26 @@ void ife_print(struct interface *i)
else
ife_print_long(i);
}
@ -154,10 +157,11 @@ diff -uNr net-tools-1.60-unpatched/lib/interface.c net-tools-1.60/lib/interface.
+ return ife->name;
+}
+
diff -uNr net-tools-1.60-unpatched/netstat.c net-tools-1.60/netstat.c
--- net-tools-1.60-unpatched/netstat.c 2001-04-15 16:41:17.000000000 +0200
+++ net-tools-1.60/netstat.c 2004-07-30 11:43:43.415346672 +0200
@@ -149,9 +149,24 @@
Index: net-tools-1.60/netstat.c
===================================================================
--- net-tools-1.60.orig/netstat.c
+++ net-tools-1.60/netstat.c
@@ -153,9 +153,24 @@ int flag_exp = 1;
int flag_prg = 0;
int flag_arg = 0;
int flag_ver = 0;
@ -182,7 +186,7 @@ diff -uNr net-tools-1.60-unpatched/netstat.c net-tools-1.60/netstat.c
#define INFO_GUTS1(file,name,proc) \
procinfo = fopen((file), "r"); \
if (procinfo == NULL) { \
@@ -249,6 +264,77 @@
@@ -253,6 +268,77 @@ static char prg_cache_loaded = 0;
/* NOT working as of glibc-2.0.7: */
#undef DIRENT_HAVE_D_TYPE_WORKS
@ -260,9 +264,9 @@ diff -uNr net-tools-1.60-unpatched/netstat.c net-tools-1.60/netstat.c
static void prg_cache_add(int inode, char *name)
{
unsigned hi = PRG_HASHIT(inode);
@@ -1452,10 +1538,20 @@
printf(_("Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg\n"));
}
@@ -1458,10 +1544,20 @@ static int iface_info(void)
get_max_ifacename();
- if (for_all_interfaces(do_if_print, &flag_all) < 0) {
- perror(_("missing interface information"));
@ -284,7 +288,7 @@ diff -uNr net-tools-1.60-unpatched/netstat.c net-tools-1.60/netstat.c
if (flag_cnt)
free_interface_list();
else {
@@ -1582,6 +1678,7 @@
@@ -1588,6 +1684,7 @@ int main
flag_lst++;
break;
case 'c':

View File

@ -1,6 +1,8 @@
--- net-tools-1.60/lib/interface.c 2009-03-18 15:16:21.000000000 +0100
+++ net-tools-1.60/lib/interface.c 2009-03-18 15:37:42.000000000 +0100
@@ -610,10 +610,10 @@
Index: net-tools-1.60/lib/interface.c
===================================================================
--- net-tools-1.60.orig/lib/interface.c
+++ net-tools-1.60/lib/interface.c
@@ -608,10 +608,10 @@ void ife_print_short(struct interface *p
printf("%5d %3d", ptr->mtu, ptr->metric);
/* If needed, display the interface statistics. */
if (ptr->statistics_valid) {
@ -13,10 +15,11 @@
ptr->stats.tx_packets, ptr->stats.tx_errors,
ptr->stats.tx_dropped, ptr->stats.tx_fifo_errors);
} else {
diff -ur net-tools-1.60.orig/netstat.c net-tools-1.60/netstat.c
--- net-tools-1.60.orig/netstat.c 2009-03-18 15:16:21.000000000 +0100
+++ net-tools-1.60/netstat.c 2009-03-18 15:39:15.000000000 +0100
@@ -1916,7 +1916,7 @@
Index: net-tools-1.60/netstat.c
===================================================================
--- net-tools-1.60.orig/netstat.c
+++ net-tools-1.60/netstat.c
@@ -1919,7 +1919,7 @@ static int iface_info(void)
}
if (flag_exp < 2) {
ife_short = 1;
@ -24,4 +27,4 @@ diff -ur net-tools-1.60.orig/netstat.c net-tools-1.60/netstat.c
+ printf(_("Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg\n"));
}
get_max_ifacename();
if (flag_cacheof == 1) {

View File

@ -1,6 +1,8 @@
--- lib/interface.c-old 2005-12-30 11:08:15.000000000 -0800
+++ lib/interface.c 2005-12-30 11:17:02.000000000 -0800
@@ -201,10 +201,11 @@
Index: lib/interface.c
===================================================================
--- lib/interface.c.orig
+++ lib/interface.c
@@ -216,10 +216,11 @@ out:
return err;
}
@ -13,7 +15,7 @@
while (*p) {
if (isspace(*p))
break;
@@ -305,9 +306,10 @@
@@ -320,9 +321,10 @@ static int if_readlist_proc(char *target
{
static int proc_read;
FILE *fh;
@ -23,9 +25,9 @@
+ char *line = NULL;
+ size_t linelen = 0;
if (proc_read)
return 0;
@@ -320,8 +322,11 @@
if (proc_read) {
return 0;
@@ -337,8 +339,11 @@ static int if_readlist_proc(char *target
_PATH_PROCNET_DEV, strerror(errno));
return if_readconf();
}
@ -39,7 +41,7 @@
#if 0 /* pretty, but can't cope with missing fields */
fmt = proc_gen_fmt(_PATH_PROCNET_DEV, 1, fh,
@@ -346,13 +351,13 @@
@@ -363,13 +368,13 @@ static int if_readlist_proc(char *target
if (!fmt)
return -1;
#else
@ -57,7 +59,7 @@
ife = add_interface(name);
get_dev_fields(s, ife);
ife->statistics_valid = 1;
@@ -368,6 +373,8 @@
@@ -385,6 +390,8 @@ static int if_readlist_proc(char *target
#if 0
free(fmt);
#endif

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Nov 3 19:09:33 UTC 2009 - coolo@novell.com
- updated patches to apply with fuzz=0
-------------------------------------------------------------------
Wed Oct 7 12:30:00 CEST 2009 - ms@suse.de