[procps-ng] - 'vmstat -w' was not wide enough (#1025833)

Jaromír Cápík jcapik at fedoraproject.org
Mon Jan 20 19:25:39 UTC 2014


commit c48f403ec4cbafb2386a9161722d6132ea6a2165
Author: Jaromir Capik <jcapik at redhat.com>
Date:   Mon Jan 20 20:25:49 2014 +0100

    - 'vmstat -w' was not wide enough (#1025833)

 procps-ng.spec                    |    9 ++++++++-
 vmstat-wide-not-wide-enough.patch |   28 ++++++++++++++++++++++++++++
 2 files changed, 36 insertions(+), 1 deletions(-)
---
diff --git a/procps-ng.spec b/procps-ng.spec
index f2ba224..9cc9932 100644
--- a/procps-ng.spec
+++ b/procps-ng.spec
@@ -4,13 +4,15 @@
 Summary: System and process monitoring utilities
 Name: procps-ng
 Version: 3.3.9
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: GPL+ and GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+
 Group: Applications/System
 URL: https://sourceforge.net/projects/procps-ng/
 
 Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.xz
 
+Patch0: vmstat-wide-not-wide-enough.patch
+
 Requires(post): /sbin/ldconfig
 Requires(postun): /sbin/ldconfig
 
@@ -73,6 +75,8 @@ System and process monitoring utilities development headers
 %prep
 %setup -q -n %{name}-%{version}
 
+%patch0 -p1
+
 
 %build
 # The following stuff is needed for git archives only
@@ -141,6 +145,9 @@ ln -s %{_bindir}/pidof %{buildroot}%{_sbindir}/pidof
 %{_includedir}/proc
 
 %changelog
+* Mon Jan 20 2014 Jaromir Capik <jcapik at redhat.com> - 3.3.9-3
+- 'vmstat -w' was not wide enough (#1025833)
+
 * Tue Jan 07 2014 Jaromir Capik <jcapik at redhat.com> - 3.3.9-2
 - Replacing the /sbin/pidof wrapper with symlink
 
diff --git a/vmstat-wide-not-wide-enough.patch b/vmstat-wide-not-wide-enough.patch
new file mode 100644
index 0000000..4156cb7
--- /dev/null
+++ b/vmstat-wide-not-wide-enough.patch
@@ -0,0 +1,28 @@
+diff --git a/vmstat.c b/vmstat.c
+index 67515c1..c01351d 100644
+--- a/vmstat.c
++++ b/vmstat.c
+@@ -187,12 +187,12 @@ static void new_header(void)
+ 	const char header[] =
+ 	    "procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----\n";
+ 	const char wide_header[] =
+-	    "procs ---------------memory-------------- ---swap-- -----io---- -system-- ------cpu-----\n";
++	    "procs -----------------------memory---------------------- ---swap-- -----io---- -system-- --------cpu--------\n";
+ 
+ 	const char format[] =
+ 	    "%2s %2s %6s %6s %6s %6s %4s %4s %5s %5s %4s %4s %2s %2s %2s %2s %2s\n";
+ 	const char wide_format[] =
+-	    "%2s %2s %8s %8s %8s %8s %4s %4s %5s %5s %4s %4s %2s %2s %2s %2s %2s\n";
++	    "%2s %2s %12s %12s %12s %12s %4s %4s %5s %5s %4s %4s %3s %3s %3s %3s %3s\n";
+ 
+ 	printf(w_option ? _(wide_header) : _(header));
+ 	printf(
+@@ -249,7 +249,7 @@ static void new_format(void)
+ 	const char format[] =
+ 	    "%2u %2u %6lu %6lu %6lu %6lu %4u %4u %5u %5u %4u %4u %2u %2u %2u %2u %2u\n";
+ 	const char wide_format[] =
+-	    "%2u %2u %8lu %8lu %8lu %8lu %4u %4u %5u %5u %4u %4u %2u %2u %2u %2u %2u\n";
++	    "%2u %2u %12lu %12lu %12lu %12lu %4u %4u %5u %5u %4u %4u %3u %3u %3u %3u %3u\n";
+ 
+ 	unsigned int tog = 0;	/* toggle switch for cleaner code */
+ 	unsigned int i;


More information about the scm-commits mailing list