From 5d207de5092f4532a1696939fdb64a85d370fb01 Mon Sep 17 00:00:00 2001 From: John Howard Date: Tue, 26 May 2015 09:33:55 -0700 Subject: [PATCH] Windows: Fix up container again Signed-off-by: John Howard --- daemon/container.go | 20 -------------------- daemon/container_linux.go | 20 ++++++++++++++++++++ daemon/container_windows.go | 4 ++++ 3 files changed, 24 insertions(+), 20 deletions(-) diff --git a/daemon/container.go b/daemon/container.go index 1f65386fa9..8602152bb4 100644 --- a/daemon/container.go +++ b/daemon/container.go @@ -1087,26 +1087,6 @@ func (container *Container) shouldRestart() bool { (container.hostConfig.RestartPolicy.Name == "on-failure" && container.ExitCode != 0) } -func (container *Container) UnmountVolumes(forceSyscall bool) error { - for _, m := range container.MountPoints { - dest, err := container.GetResourcePath(m.Destination) - if err != nil { - return err - } - - if forceSyscall { - syscall.Unmount(dest, 0) - } - - if m.Volume != nil { - if err := m.Volume.Unmount(); err != nil { - return err - } - } - } - return nil -} - func (container *Container) copyImagePathContent(v volume.Volume, destination string) error { rootfs, err := symlink.FollowSymlinkInScope(filepath.Join(container.basefs, destination), container.basefs) if err != nil { diff --git a/daemon/container_linux.go b/daemon/container_linux.go index f499235a72..2490310e9d 100644 --- a/daemon/container_linux.go +++ b/daemon/container_linux.go @@ -954,3 +954,23 @@ func (container *Container) DisableLink(name string) { } } } + +func (container *Container) UnmountVolumes(forceSyscall bool) error { + for _, m := range container.MountPoints { + dest, err := container.GetResourcePath(m.Destination) + if err != nil { + return err + } + + if forceSyscall { + syscall.Unmount(dest, 0) + } + + if m.Volume != nil { + if err := m.Volume.Unmount(); err != nil { + return err + } + } + } + return nil +} diff --git a/daemon/container_windows.go b/daemon/container_windows.go index 141c6c9ef3..0807aabc93 100644 --- a/daemon/container_windows.go +++ b/daemon/container_windows.go @@ -165,3 +165,7 @@ func disableAllActiveLinks(container *Container) { func (container *Container) DisableLink(name string) { } + +func (container *Container) UnmountVolumes(forceSyscall bool) error { + return nil +}