summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorhe <he@pkgsrc.org>2015-12-12 22:23:32 +0000
committerhe <he@pkgsrc.org>2015-12-12 22:23:32 +0000
commitec3031125564d039159737a131012086589d78b4 (patch)
treea25045c911905dd771ac695620b7bfe51d198aaf /sysutils
parent2b7798a931e7656424605087ecf0e4fab20c2f92 (diff)
downloadpkgsrc-ec3031125564d039159737a131012086589d78b4.tar.gz
Note to self: test before committing. Leave out close(fd).
Ride on the coattails of previous PKGREVISION bump.
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/collectd/distinfo4
-rw-r--r--sysutils/collectd/patches/patch-src_entropy.c9
2 files changed, 7 insertions, 6 deletions
diff --git a/sysutils/collectd/distinfo b/sysutils/collectd/distinfo
index 22a164d861d..3cb926651ba 100644
--- a/sysutils/collectd/distinfo
+++ b/sysutils/collectd/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.24 2015/12/12 21:39:25 he Exp $
+$NetBSD: distinfo,v 1.25 2015/12/12 22:23:32 he Exp $
SHA1 (collectd-5.5.0.tar.gz) = d24e284c1eae20c5e75b846c8b2612ab65bd5565
RMD160 (collectd-5.5.0.tar.gz) = 2197758942a5fe56e4eabda3786f09d4138e943a
@@ -16,7 +16,7 @@ SHA1 (patch-src_config.h.in) = be17db23b6ee7a90ba57e73f073ed5be11c369c5
SHA1 (patch-src_cpu.c) = 55b5cfc69bf0df279d1a12003eb6a8e681155e18
SHA1 (patch-src_df.c) = 7e75dfbc72ecad48eb0eb7427a19329daf6b9a60
SHA1 (patch-src_disk.c) = 159862e8ca1e841e3c4013c03ba03f059fdbbab5
-SHA1 (patch-src_entropy.c) = 2847de5df6014a7f31384a2a84096d9fb4547503
+SHA1 (patch-src_entropy.c) = 4fa683654936f57fb7366faebb93d572af08db9c
SHA1 (patch-src_irq.c) = 6b621474de35a5879105025d1a2848e4896b8479
SHA1 (patch-src_libcollectclient_network__buffer.c) = e07d403d299613fa0885a0e7285849eb85510253
SHA1 (patch-src_memory.c) = f48d50245176426e26af7fa1b1f4ff6fbf0b1d95
diff --git a/sysutils/collectd/patches/patch-src_entropy.c b/sysutils/collectd/patches/patch-src_entropy.c
index 348298bb238..b6dfa2fc43f 100644
--- a/sysutils/collectd/patches/patch-src_entropy.c
+++ b/sysutils/collectd/patches/patch-src_entropy.c
@@ -1,4 +1,4 @@
-$NetBSD: patch-src_entropy.c,v 1.5 2015/12/12 21:39:25 he Exp $
+$NetBSD: patch-src_entropy.c,v 1.6 2015/12/12 22:23:32 he Exp $
Provide a NetBSD implementation for graphing available entropy.
This version tries to keep /dev/urandom open (for repeated use),
@@ -42,7 +42,7 @@ needlessly reduce the kernel's entropy estimate.
static int entropy_read (void)
{
-@@ -74,6 +63,67 @@ static int entropy_read (void)
+@@ -74,6 +63,68 @@ static int entropy_read (void)
return (0);
}
@@ -74,8 +74,10 @@ needlessly reduce the kernel's entropy estimate.
+
+ if (fd == 0) {
+ fd = open(_PATH_URANDOM, O_RDONLY, 0644);
-+ if (fd < 0)
++ if (fd < 0) {
++ fd = 0;
+ return -1;
++ }
+ }
+
+ if (ioctl(fd, RNDGETPOOLSTAT, &rs) < 0) {
@@ -86,7 +88,6 @@ needlessly reduce the kernel's entropy estimate.
+
+ entropy_submit (rs.curentropy);
+
-+ close(fd);
+ return 0;
+}
+