rpms/mtr/devel mtr-0.69-format.patch,NONE,1.1 mtr.spec,1.23,1.24

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Mon Sep 5 15:05:22 UTC 2005


Author: pknirsch

Update of /cvs/dist/rpms/mtr/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv29401

Modified Files:
	mtr.spec 
Added Files:
	mtr-0.69-format.patch 
Log Message:
- Made the output, especially for reports much more readable (#147865)


mtr-0.69-format.patch:
 mtr.c    |    2 +-
 report.c |   10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

--- NEW FILE mtr-0.69-format.patch ---
--- 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;


Index: mtr.spec
===================================================================
RCS file: /cvs/dist/rpms/mtr/devel/mtr.spec,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- mtr.spec	2 Mar 2005 16:25:38 -0000	1.23
+++ mtr.spec	5 Sep 2005 15:05:20 -0000	1.24
@@ -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 @@
 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 @@
 %setup -q
 %patch0 -p1 -b .s390x
 %patch1 -p1 -b .CVE-2002-0497
+%patch2 -p1 -b .format
 aclocal
 automake -a
 autoconf
@@ -95,6 +97,9 @@
 %{_datadir}/pixmaps/mtr_icon.xpm
 
 %changelog
+* Mon Sep 05 2005 Phil Knirsch <pknirsch at redhat.com> 2:0.69-4
+- Made the output, especially for reports much more readable (#147865)
+
 * Wed Mar 02 2005 Phil Knirsch <pknirsch at redhat.com> 2:0.69-3
 - bump release and rebuild with gcc 4
 




More information about the fedora-cvs-commits mailing list