Skip to content

Commit 474abe5

Browse files
committed
mount: remove unused mount.PID()
Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent f6a0ec7 commit 474abe5

3 files changed

Lines changed: 2 additions & 50 deletions

File tree

mount/mountinfo_linux.go

Lines changed: 0 additions & 35 deletions
This file was deleted.
Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build freebsd openbsd
1+
// +build linux freebsd openbsd
22

33
/*
44
Copyright The containerd Authors.
@@ -19,18 +19,10 @@
1919
package mount
2020

2121
import (
22-
"fmt"
23-
"runtime"
24-
2522
"github.com/moby/sys/mountinfo"
2623
)
2724

2825
// Self retrieves a list of mounts for the current running process.
2926
func Self() ([]*Info, error) {
3027
return mountinfo.GetMounts(nil)
3128
}
32-
33-
// PID collects the mounts for a specific process ID.
34-
func PID(pid int) ([]*Info, error) {
35-
return nil, fmt.Errorf("mountinfo.PID is not implemented on %s/%s", runtime.GOOS, runtime.GOARCH)
36-
}

mount/mountinfo_unsupported.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build !linux,!freebsd,!solaris,!openbsd freebsd,!cgo solaris,!cgo openbsd,!cgo
1+
// +build !linux,!freebsd,!openbsd
22

33
/*
44
Copyright The containerd Authors.
@@ -27,8 +27,3 @@ import (
2727
func Self() ([]*Info, error) {
2828
return nil, fmt.Errorf("mountinfo.Self is not implemented on %s/%s", runtime.GOOS, runtime.GOARCH)
2929
}
30-
31-
// PID collects the mounts for a specific process ID.
32-
func PID(pid int) ([]*Info, error) {
33-
return nil, fmt.Errorf("mountinfo.PID is not implemented on %s/%s", runtime.GOOS, runtime.GOARCH)
34-
}

0 commit comments

Comments
 (0)