pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/parallel/ganglia-monitor-core Apply patch from Mark Da...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/87253332ec40
branches:  trunk
changeset: 493303:87253332ec40
user:      jschauma <jschauma%pkgsrc.org@localhost>
date:      Mon May 02 18:15:57 2005 +0000

description:
Apply patch from Mark Davies to make this build after stafs -> statvfs
(ie NetBSD-3 and -current).

diffstat:

 parallel/ganglia-monitor-core/distinfo         |   4 ++--
 parallel/ganglia-monitor-core/patches/patch-ab |  16 ++++++++++++++--
 2 files changed, 16 insertions(+), 4 deletions(-)

diffs (65 lines):

diff -r 0e0f2b51d7c0 -r 87253332ec40 parallel/ganglia-monitor-core/distinfo
--- a/parallel/ganglia-monitor-core/distinfo    Mon May 02 17:58:00 2005 +0000
+++ b/parallel/ganglia-monitor-core/distinfo    Mon May 02 18:15:57 2005 +0000
@@ -1,10 +1,10 @@
-$NetBSD: distinfo,v 1.5 2005/04/13 01:57:29 jschauma Exp $
+$NetBSD: distinfo,v 1.6 2005/05/02 18:15:57 jschauma Exp $
 
 SHA1 (ganglia-3.0.1.tar.bz2) = 3e5c4ec4a509713974dd1e8d516127f6aa2c5a20
 RMD160 (ganglia-3.0.1.tar.bz2) = 1f0ecc7388f1058d64df9ab98734810a983e6d26
 Size (ganglia-3.0.1.tar.bz2) = 2649342 bytes
 SHA1 (patch-aa) = 88972d2268ebc76d72d8f2197bb272c6553f7098
-SHA1 (patch-ab) = a8b766000f725ed1785c4b3d2baecfa2cbe66da1
+SHA1 (patch-ab) = 6b349e90cdbf1a988aceb6222b5d67cacffe0a61
 SHA1 (patch-ac) = 23ad60ea06080a6763b21256e20549868110cf54
 SHA1 (patch-ad) = 4f03c665800827e1d89d7d76b81b667f0cf82ca6
 SHA1 (patch-ae) = 417a7ed552583fc61f8c3e095e9233c68311caf9
diff -r 0e0f2b51d7c0 -r 87253332ec40 parallel/ganglia-monitor-core/patches/patch-ab
--- a/parallel/ganglia-monitor-core/patches/patch-ab    Mon May 02 17:58:00 2005 +0000
+++ b/parallel/ganglia-monitor-core/patches/patch-ab    Mon May 02 18:15:57 2005 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-ab,v 1.3 2005/04/13 01:57:29 jschauma Exp $
+$NetBSD: patch-ab,v 1.4 2005/05/02 18:15:57 jschauma Exp $
 
 --- /dev/null  2005-04-12 21:39:02.000000000 -0400
 +++ srclib/libmetrics/netbsd/metrics.c 2005-04-12 21:34:24.000000000 -0400
-@@ -0,0 +1,1279 @@
+@@ -0,0 +1,1291 @@
 +/*
 + *  First stab at support for metrics in NetBSD
 + *  by Jan Schaumann <jschauma%netbsd.org@localhost>
@@ -37,6 +37,10 @@
 +#include "interface.h"
 +#include "libmetrics.h"
 +
++#ifdef HAVE_SYS_STATVFS_H
++#define statfs statvfs
++#endif
++
 +#define MIB_SWAPINFO_SIZE 3
 +
 +#ifndef MIN_NET_POLL_INTERVAL
@@ -932,7 +936,11 @@
 +      mntsize = getmntinfo(&mntbuf, MNT_NOWAIT);
 +      mntsize = regetmntinfo(&mntbuf, mntsize, vfslist);
 +      for (i = 0; i < mntsize; i++) {
++#ifdef HAVE_SYS_STATVFS_H
++              if ((mntbuf[i].f_flag & MNT_IGNORE) == 0) {
++#else
 +              if ((mntbuf[i].f_flags & MNT_IGNORE) == 0) {
++#endif
 +                      used = mntbuf[i].f_blocks - mntbuf[i].f_bfree;
 +                      availblks = mntbuf[i].f_bavail + used;
 +                      pct = (availblks == 0 ? 100.0 :
@@ -940,7 +948,11 @@
 +                      if (pct > most_full)
 +                              most_full = pct;
 +
++#ifdef HAVE_SYS_STATVFS_H
++                      toru = reported_units/mntbuf[i].f_frsize;
++#else
 +                      toru = reported_units/mntbuf[i].f_bsize;
++#endif
 +                      *total += mntbuf[i].f_blocks / toru;
 +                      *tot_avail += mntbuf[i].f_bavail / toru;
 +              }



Home | Main Index | Thread Index | Old Index