mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 13:37:30 +00:00
Fix mount refactor nits
This commit is contained in:
parent
2700871b04
commit
17b51a93a3
@ -18,7 +18,7 @@ package mount
|
|||||||
|
|
||||||
// FakeMounter implements mount.Interface.
|
// FakeMounter implements mount.Interface.
|
||||||
type FakeMounter struct {
|
type FakeMounter struct {
|
||||||
mountPoints []MountPoint
|
MountPoints []MountPoint
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *FakeMounter) Mount(source string, target string, fstype string, flags uintptr, data string) error {
|
func (f *FakeMounter) Mount(source string, target string, fstype string, flags uintptr, data string) error {
|
||||||
@ -30,5 +30,5 @@ func (f *FakeMounter) Unmount(target string, flags int) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (f *FakeMounter) List() ([]MountPoint, error) {
|
func (f *FakeMounter) List() ([]MountPoint, error) {
|
||||||
return f.mountPoints, nil
|
return f.MountPoints, nil
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@ type MountPoint struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Examines /proc/mounts to find all other references to the device referenced
|
// Examines /proc/mounts to find all other references to the device referenced
|
||||||
// by mountPath.
|
// by mountPath; returns a list of paths.
|
||||||
func GetMountRefs(mounter Interface, mountPath string) ([]string, error) {
|
func GetMountRefs(mounter Interface, mountPath string) ([]string, error) {
|
||||||
mps, err := mounter.List()
|
mps, err := mounter.List()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user