use sys/unix package instead of syscall (#1340)
According to the golang docs, the syscall package is deprecated. https://golang.org/pkg/syscall This updates collectors to use the x/sys/unix package instead. Also updates the vendored x/sys/unix module to latest. Signed-off-by: Paul Gier <pgier@redhat.com>
This commit is contained in:
parent
f97f01c46c
commit
d0a66c4c40
39 changed files with 2942 additions and 19 deletions
|
|
@ -22,10 +22,10 @@ import (
|
|||
"os"
|
||||
"strings"
|
||||
"sync"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"github.com/prometheus/common/log"
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
@ -70,9 +70,8 @@ func (c *filesystemCollector) GetStats() ([]filesystemStats, error) {
|
|||
success := make(chan struct{})
|
||||
go stuckMountWatcher(labels.mountPoint, success)
|
||||
|
||||
buf := new(syscall.Statfs_t)
|
||||
err = syscall.Statfs(rootfsFilePath(labels.mountPoint), buf)
|
||||
|
||||
buf := new(unix.Statfs_t)
|
||||
err = unix.Statfs(rootfsFilePath(labels.mountPoint), buf)
|
||||
stuckMountsMtx.Lock()
|
||||
close(success)
|
||||
// If the mount has been marked as stuck, unmark it and log it's recovery.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue