Use mountpoint as image fs identifier.

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu
2018-02-09 07:46:49 +00:00
parent a555bc25b9
commit 6900cbdada
10 changed files with 16 additions and 99 deletions

View File

@@ -50,7 +50,6 @@ type FakeOS struct {
MountFn func(source string, target string, fstype string, flags uintptr, data string) error
UnmountFn func(target string, flags int) error
LookupMountFn func(path string) (containerdmount.Info, error)
DeviceUUIDFn func(device uint64) (string, error)
calls []CalledDetail
errors map[string]error
}
@@ -241,16 +240,3 @@ func (f *FakeOS) LookupMount(path string) (containerdmount.Info, error) {
}
return containerdmount.Info{}, nil
}
// DeviceUUID is a fake call that invodes DeviceUUIDFn or just return nil.
func (f *FakeOS) DeviceUUID(device uint64) (string, error) {
f.appendCalls("DeviceUUID", device)
if err := f.getError("DeviceUUID"); err != nil {
return "", err
}
if f.DeviceUUIDFn != nil {
return f.DeviceUUIDFn(device)
}
return "", nil
}