rpms/libgtop2/devel read-cpuinfo-completely.patch, NONE, 1.1 libgtop2.spec, 1.67, 1.68
Matthias Clasen
mclasen at fedoraproject.org
Mon Nov 10 01:53:50 UTC 2008
Author: mclasen
Update of /cvs/extras/rpms/libgtop2/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv23249
Modified Files:
libgtop2.spec
Added Files:
read-cpuinfo-completely.patch
Log Message:
read /proc files carefully
read-cpuinfo-completely.patch:
--- NEW FILE read-cpuinfo-completely.patch ---
Index: sysdeps/linux/sysinfo.c
===================================================================
--- sysdeps/linux/sysinfo.c (revision 2781)
+++ sysdeps/linux/sysinfo.c (working copy)
@@ -36,12 +36,12 @@
static void
init_sysinfo (glibtop *server)
{
- char buffer [16384];
+ gchar *buffer;
gchar ** processors;
if(G_LIKELY(sysinfo.flags)) return;
- file_to_buffer(server, buffer, sizeof buffer, FILENAME);
+ if (!g_file_get_contents("/proc/cpuinfo", &buffer, NULL, NULL)) return;
/* cpuinfo records are seperated by a blank line */
processors = g_strsplit(buffer, "\n\n", 0);
Index: libgtop2.spec
===================================================================
RCS file: /cvs/extras/rpms/libgtop2/devel/libgtop2.spec,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -r1.67 -r1.68
--- libgtop2.spec 23 Sep 2008 15:48:43 -0000 1.67
+++ libgtop2.spec 10 Nov 2008 01:53:20 -0000 1.68
@@ -7,7 +7,7 @@
Name: libgtop2
Summary: libgtop library (version 2)
Version: 2.24.0
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2+
URL: http://download.gnome.org/sources/libgtop/2.24
Group: System Environment/Libraries
@@ -21,6 +21,9 @@
BuildRequires: automake
BuildRequires: gtk-doc
+# http://bugzilla.gnome.org/show_bug.cgi?id=468495
+Patch0: read-cpuinfo-completely.patch
+
%description
libgtop is a library for portably obtaining information about processes,
such as their PID, memory usage, etc.
@@ -39,6 +42,7 @@
%prep
%setup -q -n libgtop-%{version}
+%patch0 -p0 -b .read-cpuinfo-completely
%build
%configure --disable-gtk-doc --disable-static
@@ -75,6 +79,9 @@
%exclude %{_datadir}/info
%changelog
+* Sun Nov 9 2008 Matthias Clasen <mclasen at redhat.com> - 2.24.0-2
+- Read /proc/cpuinfo completely (#467455)
+
* Tue Sep 23 2008 Matthias Clasen <mclasen at redhat.com> - 2.24.0-1
- Update to 2.24.0
More information about the scm-commits
mailing list