aboutsummaryrefslogtreecommitdiff
path: root/collector/filesystem_bsd.go
diff options
context:
space:
mode:
authorChristian Schwarz <me@cschwarz.com>2016-02-16 11:34:17 +0100
committerChristian Schwarz <me@cschwarz.com>2016-02-16 13:35:08 +0100
commita40bdcaa36627066d29d57187215c84abb28b797 (patch)
treec716f6a84594b32221c6659e0563d8a40a77ed3e /collector/filesystem_bsd.go
parentfddc67bda6af93705bac98cc94c867ea24652737 (diff)
downloadprometheus_node_collector-a40bdcaa36627066d29d57187215c84abb28b797.tar.bz2
prometheus_node_collector-a40bdcaa36627066d29d57187215c84abb28b797.tar.xz
prometheus_node_collector-a40bdcaa36627066d29d57187215c84abb28b797.zip
Fix compile error on FreeBSD
When compiling `20ecedd0b4c983bd7b88f97cd7a21461988a6c12` with GNU make (`gmake`) on FreeBSD 10.2-RELEASE, I get the following error: ``` collector/filesystem_bsd.go:60: non-bool mnt[i].f_flags & MNT_RDONLY (type C.uint64_t) used as if condition Makefile.COMMON:85: recipe for target 'node_exporter' failed gmake: *** [node_exporter] Error 2 ``` This problem is fixed by this patch.
Diffstat (limited to 'collector/filesystem_bsd.go')
-rw-r--r--collector/filesystem_bsd.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/collector/filesystem_bsd.go b/collector/filesystem_bsd.go
index d7ba543..ffe916b 100644
--- a/collector/filesystem_bsd.go
+++ b/collector/filesystem_bsd.go
@@ -57,7 +57,7 @@ func (c *filesystemCollector) GetStats() (stats []filesystemStats, err error) {
57 fstype := C.GoString(&mnt[i].f_fstypename[0]) 57 fstype := C.GoString(&mnt[i].f_fstypename[0])
58 58
59 var ro float64 59 var ro float64
60 if mnt[i].f_flags & MNT_RDONLY { 60 if (mnt[i].f_flags & MNT_RDONLY) != 0 {
61 ro = 1 61 ro = 1
62 } 62 }
63 63