1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

devmapper: implement OnRemove

This commit is contained in:
Solomon Hykes 2013-11-02 21:25:06 +00:00
parent d2c2c2c116
commit d23b9e8734

View file

@ -73,6 +73,13 @@ func (b *DMBackend) OnCreate(img Image, layer archive.Archive) error {
return nil return nil
} }
func (b *DMBackend) OnRemove(img Image) error {
id := img.ID()
if err := b.DeviceSet.RemoveDevice(id); err != nil {
return fmt.Errorf("Unable to remove device for %v: %v", id, err)
}
return nil
}
func (b *DMBackend) mountpoint(id string) string { func (b *DMBackend) mountpoint(id string) string {
if b.home == "" { if b.home == "" {