Tizen_4.0 base
[platform/upstream/docker-engine.git] / daemon / archive_unix.go
1 // +build !windows
2
3 package daemon
4
5 import (
6         "github.com/docker/docker/container"
7 )
8
9 // checkIfPathIsInAVolume checks if the path is in a volume. If it is, it
10 // cannot be in a read-only volume. If it  is not in a volume, the container
11 // cannot be configured with a read-only rootfs.
12 func checkIfPathIsInAVolume(container *container.Container, absPath string) (bool, error) {
13         var toVolume bool
14         for _, mnt := range container.MountPoints {
15                 if toVolume = mnt.HasResource(absPath); toVolume {
16                         if mnt.RW {
17                                 break
18                         }
19                         return false, ErrVolumeReadonly
20                 }
21         }
22         return toVolume, nil
23 }
24
25 // isOnlineFSOperationPermitted returns an error if an online filesystem operation
26 // is not permitted.
27 func (daemon *Daemon) isOnlineFSOperationPermitted(container *container.Container) error {
28         return nil
29 }