pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/xfce4-cpugraph-plugin Fix a bug in the first ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/735776dbb60a
branches:  trunk
changeset: 524175:735776dbb60a
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Sat Jan 20 12:33:37 2007 +0000

description:
Fix a bug in the first version of the DragonFly support.

diffstat:

 sysutils/xfce4-cpugraph-plugin/distinfo         |   4 ++--
 sysutils/xfce4-cpugraph-plugin/patches/patch-ab |  10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

diffs (39 lines):

diff -r 59d36060f057 -r 735776dbb60a sysutils/xfce4-cpugraph-plugin/distinfo
--- a/sysutils/xfce4-cpugraph-plugin/distinfo   Sat Jan 20 12:18:31 2007 +0000
+++ b/sysutils/xfce4-cpugraph-plugin/distinfo   Sat Jan 20 12:33:37 2007 +0000
@@ -1,9 +1,9 @@
-$NetBSD: distinfo,v 1.6 2007/01/20 12:18:31 joerg Exp $
+$NetBSD: distinfo,v 1.7 2007/01/20 12:33:37 joerg Exp $
 
 SHA1 (xfce4-cpugraph-plugin-0.2.2.tar.gz) = 64914e2d766ba093b6158d45ab37c0021057121b
 RMD160 (xfce4-cpugraph-plugin-0.2.2.tar.gz) = c1af61ae6961b4cbdd16dad925bf805440c24aa5
 Size (xfce4-cpugraph-plugin-0.2.2.tar.gz) = 210953 bytes
 SHA1 (patch-aa) = fe1b2d46334ba73a9a6c661c09b14bc1f2a342a9
-SHA1 (patch-ab) = 547a43d4df832c0f08cc7dd27856d0542de7aa8a
+SHA1 (patch-ab) = d0a98d9cf51d8030889e2554cef9564dea8dfd0b
 SHA1 (patch-ac) = 47c0e53b7dddf0307cc949aa69c335c1492e8584
 SHA1 (patch-ad) = a989f0ed1b91d2e1fbc61fa623b989d371be80e0
diff -r 59d36060f057 -r 735776dbb60a sysutils/xfce4-cpugraph-plugin/patches/patch-ab
--- a/sysutils/xfce4-cpugraph-plugin/patches/patch-ab   Sat Jan 20 12:18:31 2007 +0000
+++ b/sysutils/xfce4-cpugraph-plugin/patches/patch-ab   Sat Jan 20 12:33:37 2007 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-ab,v 1.1 2007/01/20 12:18:31 joerg Exp $
+$NetBSD: patch-ab,v 1.2 2007/01/20 12:33:37 joerg Exp $
 
 --- panel-plugin/os.c.orig     2004-06-07 01:16:30.000000000 +0000
 +++ panel-plugin/os.c
@@ -16,10 +16,10 @@
 +              g_warning("kinfo_get_sched_cputime failed");
 +              return 0;
 +      }
-+      used = cp_time.cp_user + cp_time.cp_nice + cp_time.cp_sys - *oldusage;
-+      total = used + cp_time.cp_idle - *oldtotal;
-+      if (total != 0)
-+              usage = 100 * (used + used / 2) / total;
++      used = cp_time.cp_user + cp_time.cp_nice + cp_time.cp_sys;
++      total = used + cp_time.cp_idle;
++      if (total != *oldtotal)
++              usage = 100 * (used - *oldusage + used / 2 - *oldusage / 2) / (total - *oldtotal);
 +      else
 +              usage = 0;
 +      *oldusage = used;



Home | Main Index | Thread Index | Old Index