Fixing empty pmap output on ppc/s390 (#906457)
This commit is contained in:
parent
a56e0566fd
commit
4cbb703663
42
procps-ng-pmap-pidlist-type.patch
Normal file
42
procps-ng-pmap-pidlist-type.patch
Normal file
@ -0,0 +1,42 @@
|
||||
From 0d476355aafa4377fac05cf01ac9284d6fe7cad0 Mon Sep 17 00:00:00 2001
|
||||
From: Jaromir Capik <jcapik@redhat.com>
|
||||
Date: Mon, 4 Feb 2013 18:21:39 +0100
|
||||
Subject: [PATCH] pmap: empty output or crashes on ppc/s390 caused by wrong
|
||||
pidlist type
|
||||
|
||||
Previously the pidlist variable was defined as unsigned long *
|
||||
whilst the openproc function accepts pid_t *.
|
||||
Both target types differ in size (8 != 4) and therefore the issue
|
||||
mainly affects big endian architectures.
|
||||
|
||||
This commit changes the pidlist type to pid_t * so that it's
|
||||
compatible with openproc.
|
||||
---
|
||||
pmap.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/pmap.c b/pmap.c
|
||||
index 7862eac..edabdcf 100644
|
||||
--- a/pmap.c
|
||||
+++ b/pmap.c
|
||||
@@ -621,7 +621,7 @@ static void range_arguments(char *optarg)
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
- unsigned long *pidlist;
|
||||
+ pid_t *pidlist;
|
||||
unsigned count = 0;
|
||||
PROCTAB *PT;
|
||||
proc_t p;
|
||||
@@ -689,7 +689,7 @@ int main(int argc, char **argv)
|
||||
x_option && (d_option || X_option))
|
||||
xerrx(EXIT_FAILURE, _("options -d, -x, -X are mutually exclusive"));
|
||||
|
||||
- pidlist = xmalloc(sizeof(unsigned long) * argc);
|
||||
+ pidlist = xmalloc(sizeof(pid_t) * argc);
|
||||
|
||||
while (*argv) {
|
||||
char *walk = *argv++;
|
||||
--
|
||||
1.7.11.7
|
||||
|
@ -3,13 +3,15 @@
|
||||
Summary: System and process monitoring utilities
|
||||
Name: procps-ng
|
||||
Version: 3.3.6
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
License: GPLv2+ and LGPLv2+
|
||||
Group: Applications/System
|
||||
URL: https://sourceforge.net/projects/procps-ng/
|
||||
|
||||
Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.xz
|
||||
|
||||
Patch0: procps-ng-pmap-pidlist-type.patch
|
||||
|
||||
Requires(post): /sbin/ldconfig
|
||||
Requires(postun): /sbin/ldconfig
|
||||
|
||||
@ -64,6 +66,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
|
||||
#echo "%{version}" > .tarball-version
|
||||
@ -125,6 +129,9 @@ mkdir -p %{buildroot}%{_sysconfdir}/sysctl.d
|
||||
%{_includedir}/proc
|
||||
|
||||
%changelog
|
||||
* Tue Feb 05 2013 Jaromir Capik <jcapik@redhat.com> - 3.3.6-4
|
||||
- Fixing empty pmap output on ppc/s390 (#906457)
|
||||
|
||||
* Tue Jan 15 2013 Jaromir Capik <jcapik@redhat.com> - 3.3.6-3
|
||||
- Typo in the description, pdwx instead of pwdx (#891476)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user