mirror of
https://github.com/containers/podman.git
synced 2025-12-12 01:38:04 +08:00
vendor: update c/storage
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
17
vendor/github.com/containers/storage/pkg/mount/mountinfo_linux.go
generated
vendored
17
vendor/github.com/containers/storage/pkg/mount/mountinfo_linux.go
generated
vendored
@@ -1,5 +1,18 @@
|
||||
package mount
|
||||
|
||||
import "github.com/moby/sys/mountinfo"
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
var PidMountInfo = mountinfo.PidMountInfo
|
||||
"github.com/moby/sys/mountinfo"
|
||||
)
|
||||
|
||||
func PidMountInfo(pid int) ([]*Info, error) {
|
||||
f, err := os.Open(fmt.Sprintf("/proc/%d/mountinfo", pid))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer f.Close()
|
||||
|
||||
return mountinfo.GetMountsFromReader(f, nil)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user