OBS User autobuild 2009-11-16 16:04:12 +00:00 committed by Git OBS Bridge
parent efc5182a49
commit 3ba8a03604
4 changed files with 46 additions and 60 deletions

View File

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

View File

@ -1,8 +1,6 @@
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
--- 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 @@
printf("%5d %3d", ptr->mtu, ptr->metric);
/* If needed, display the interface statistics. */
if (ptr->statistics_valid) {
@ -15,11 +13,10 @@ Index: net-tools-1.60/lib/interface.c
ptr->stats.tx_packets, ptr->stats.tx_errors,
ptr->stats.tx_dropped, ptr->stats.tx_fifo_errors);
} else {
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)
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 @@
}
if (flag_exp < 2) {
ife_short = 1;
@ -27,4 +24,4 @@ Index: 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"));
}
if (flag_cacheof == 1) {
get_max_ifacename();

View File

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

View File

@ -1,8 +1,3 @@
-------------------------------------------------------------------
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