diff --git a/ksh-skip-trailing-zeros.patch b/ksh-skip-trailing-zeros.patch new file mode 100644 index 0000000..16dd067 --- /dev/null +++ b/ksh-skip-trailing-zeros.patch @@ -0,0 +1,11 @@ +diff -Naur procps-ng-3.3.9.orig/proc/readproc.c procps-ng-3.3.9/proc/readproc.c +--- procps-ng-3.3.9.orig/proc/readproc.c 2013-11-25 10:57:32.000000000 +0100 ++++ procps-ng-3.3.9/proc/readproc.c 2014-01-24 16:20:02.222000000 +0100 +@@ -686,6 +686,7 @@ + close(fd); + if(n){ + int i=n; ++ while(i && dst[i-1]=='\0') --i; // skip trailing zeros + while(i--) + if(dst[i]=='\n' || dst[i]=='\0') dst[i]=sep; + if(dst[n-1]==' ') dst[n-1]='\0'; diff --git a/procps-ng.spec b/procps-ng.spec index 9cc9932..b45eb4f 100644 --- a/procps-ng.spec +++ b/procps-ng.spec @@ -4,7 +4,7 @@ Summary: System and process monitoring utilities Name: procps-ng Version: 3.3.9 -Release: 3%{?dist} +Release: 4%{?dist} License: GPL+ and GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ Group: Applications/System URL: https://sourceforge.net/projects/procps-ng/ @@ -12,6 +12,7 @@ URL: https://sourceforge.net/projects/procps-ng/ Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.xz Patch0: vmstat-wide-not-wide-enough.patch +Patch1: ksh-skip-trailing-zeros.patch Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig @@ -76,6 +77,7 @@ System and process monitoring utilities development headers %setup -q -n %{name}-%{version} %patch0 -p1 +%patch1 -p1 %build @@ -145,6 +147,9 @@ ln -s %{_bindir}/pidof %{buildroot}%{_sbindir}/pidof %{_includedir}/proc %changelog +* Fri Jan 24 2014 Jaromir Capik - 3.3.9-4 +- Skipping trailing zeros in read_unvectored (#1057600) + * Mon Jan 20 2014 Jaromir Capik - 3.3.9-3 - 'vmstat -w' was not wide enough (#1025833)