- Made the output, especially for reports much more readable (#147865)
This commit is contained in:
parent
114abf839b
commit
87a6c82994
50
mtr-0.69-format.patch
Normal file
50
mtr-0.69-format.patch
Normal file
@ -0,0 +1,50 @@
|
||||
--- mtr-0.69/mtr.c.format 2005-09-05 17:02:01.000000000 +0200
|
||||
+++ mtr-0.69/mtr.c 2005-09-05 17:01:19.000000000 +0200
|
||||
@@ -74,7 +74,7 @@
|
||||
|
||||
|
||||
/* default display field(defined by key in net.h) and order */
|
||||
-unsigned char fld_active[2*MAXFLD] = "LS NABWV";
|
||||
+unsigned char fld_active[2*MAXFLD] = "LNABWV";
|
||||
int fld_index[256];
|
||||
char available_options[MAXFLD];
|
||||
|
||||
--- mtr-0.69/report.c.format 2005-09-05 17:02:07.000000000 +0200
|
||||
+++ mtr-0.69/report.c 2005-09-05 17:02:53.000000000 +0200
|
||||
@@ -58,13 +58,13 @@
|
||||
int len=0;
|
||||
struct hostent *host;
|
||||
|
||||
- sprintf(buf, "HOST: %-33s", LocalHostname);
|
||||
+ sprintf(buf, "%-33s Snt: %-5d", LocalHostname, MaxPing);
|
||||
for( i=0; i<MAXFLD; i++ ) {
|
||||
j = fld_index[fld_active[i]];
|
||||
if (j < 0) continue;
|
||||
|
||||
sprintf( fmt, "%%%ds", data_fields[j].length );
|
||||
- sprintf( buf +33+ len, fmt, data_fields[j].title );
|
||||
+ sprintf( buf +44+ len, fmt, data_fields[j].title );
|
||||
len += data_fields[j].length;
|
||||
}
|
||||
printf("%s\n",buf);
|
||||
@@ -88,17 +88,17 @@
|
||||
}
|
||||
|
||||
len=0;
|
||||
- sprintf( buf, " %2d. %-33s", at+1, name);
|
||||
+ sprintf( buf, "%-49s", name);
|
||||
for( i=0; i<MAXFLD; i++ ) {
|
||||
j = fld_index[fld_active [i]];
|
||||
if (j < 0) continue;
|
||||
|
||||
/* 1000.0 is a temporay hack for stats usec to ms, impacted net_loss. */
|
||||
if( index( data_fields[j].format, 'f' ) ) {
|
||||
- sprintf( buf +33+ len, data_fields[j].format,
|
||||
+ sprintf( buf +44+ len, data_fields[j].format,
|
||||
data_fields[j].net_xxx(at) /1000.0 );
|
||||
} else {
|
||||
- sprintf( buf +33+ len, data_fields[j].format,
|
||||
+ sprintf( buf +44+ len, data_fields[j].format,
|
||||
data_fields[j].net_xxx(at) );
|
||||
}
|
||||
len += data_fields[j].length;
|
7
mtr.spec
7
mtr.spec
@ -1,7 +1,7 @@
|
||||
Summary: A network diagnostic tool.
|
||||
Name: mtr
|
||||
Version: 0.69
|
||||
Release: 3
|
||||
Release: 4
|
||||
Epoch: 2
|
||||
Group: Applications/Internet
|
||||
License: GPL
|
||||
@ -11,6 +11,7 @@ Source1: xmtr.consolehelper
|
||||
Source2: xmtr.pam
|
||||
Patch0: mtr-0.49-s390x.patch
|
||||
Patch1: mtr-0.69-CVE-2002-0497.patch
|
||||
Patch2: mtr-0.69-format.patch
|
||||
BuildRequires: ncurses-devel libtermcap-devel
|
||||
BuildRequires: automake, gtk2-devel
|
||||
|
||||
@ -36,6 +37,7 @@ diagnostic tool.
|
||||
%setup -q
|
||||
%patch0 -p1 -b .s390x
|
||||
%patch1 -p1 -b .CVE-2002-0497
|
||||
%patch2 -p1 -b .format
|
||||
aclocal
|
||||
automake -a
|
||||
autoconf
|
||||
@ -95,6 +97,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_datadir}/pixmaps/mtr_icon.xpm
|
||||
|
||||
%changelog
|
||||
* Mon Sep 05 2005 Phil Knirsch <pknirsch@redhat.com> 2:0.69-4
|
||||
- Made the output, especially for reports much more readable (#147865)
|
||||
|
||||
* Wed Mar 02 2005 Phil Knirsch <pknirsch@redhat.com> 2:0.69-3
|
||||
- bump release and rebuild with gcc 4
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user