Get the mountInfo by 'LookupMount' in containerd

Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
This commit is contained in:
Yanqiang Miao
2017-09-27 20:54:20 +08:00
parent e4b818ff41
commit c65921b16a
5 changed files with 45 additions and 110 deletions

View File

@@ -43,7 +43,6 @@ type OS interface {
WriteFile(filename string, data []byte, perm os.FileMode) error
Mount(source string, target string, fstype string, flags uintptr, data string) error
Unmount(target string, flags int) error
GetMounts() ([]*mount.Info, error)
LookupMount(path string) (containerdmount.Info, error)
DeviceUUID(device uint64) (string, error)
}
@@ -121,11 +120,6 @@ func (RealOS) Unmount(target string, flags int) error {
return unix.Unmount(target, flags)
}
// GetMounts retrieves a list of mounts for the current running process.
func (RealOS) GetMounts() ([]*mount.Info, error) {
return mount.GetMounts()
}
// LookupMount gets mount info of a given path.
func (RealOS) LookupMount(path string) (containerdmount.Info, error) {
return containerdmount.Lookup(path)