[Pkg-wmaker-commits] [wmtop] 03/34: Imported Debian patch 0.84-3

Doug Torrance dtorrance-guest at moszumanska.debian.org
Wed Aug 26 01:01:29 UTC 2015


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch master
in repository wmtop.

commit 719a054542b49bd5a4732f99674d1bdf8c0fb93c
Author: Hugo van der Merwe <hvdm at debian.org>
Date:   Sat Jan 3 23:43:38 2004 +0200

    Imported Debian patch 0.84-3
---
 debian/changelog |  7 +++++++
 debian/control   |  2 +-
 debian/copyright |  5 +++--
 wmtop.c          | 13 ++++++++-----
 4 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index e5f6682..2987496 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+wmtop (0.84-3) unstable; urgency=low
+
+  * Fix wmtop memory reported for kernel 2.6 (Closes: #224732)
+    (Thanks Dwayne C. Litzenberger)
+
+ -- Hugo van der Merwe <hvdm at debian.org>  Sat,  3 Jan 2004 23:43:38 +0200
+
 wmtop (0.84-2) unstable; urgency=low
 
   * Removed /usr/man/man1 dir from package
diff --git a/debian/control b/debian/control
index cbc0830..4a9f806 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: x11
 Priority: optional
 Maintainer: Hugo van der Merwe <hvdm at debian.org>
 Build-Depends: debhelper (>> 3.0.0), xlibs-dev
-Standards-Version: 3.5.2
+Standards-Version: 3.5.6
 
 Package: wmtop
 Architecture: any
diff --git a/debian/copyright b/debian/copyright
index 002dfb9..f3573fe 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,9 +1,10 @@
 This package was debianized by Edward C. Lang
 <edlang at debian.org> on Fri, 14 Apr 2000 19:38:08 +1000
 
-It was originally downloaded from http://www.tanelorn.demon.co.uk/Computing/
+It was originally downloaded from
+        http://www.tanelorn.demon.co.uk/Computing/
 
-Upstream Author(s): Dan Piponi <dan at tanelorn.demon.co.uk>
+Upstream Author: Dan Piponi <dan at tanelorn.demon.co.uk>
 
 Copyright:
 
diff --git a/wmtop.c b/wmtop.c
index 1c0895f..b5b8441 100644
--- a/wmtop.c
+++ b/wmtop.c
@@ -843,7 +843,7 @@ void calc_cpu_each(int total) {
 #if defined(LINUX)
 int calc_mem_total() {
     int ps;
-    char line[512];
+    char line[1024];
     char *ptr;
     int rc;
 
@@ -853,13 +853,16 @@ int calc_mem_total() {
     if (rc<0)
 	return 0;
 
-    if ((ptr = strstr(line, "Mem:")) == NULL) {
-        return 0;
-    } else {
+    if ((ptr = strstr(line, "Mem:")) != NULL) {
         ptr += 4;
         return atoi(ptr);
+    } else if ((ptr = strstr(line, "MemTotal:")) != NULL) {
+        /* The "Mem:" line has been removed in Linux 2.6 */
+        ptr += 9;
+        return atoi(ptr) << 10; /* MemTotal is given in kiB */
+    } else {
+        return 0;
     }
-
 }
 #endif /* defined(LINUX) */
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmtop.git



More information about the Pkg-wmaker-commits mailing list