The logic is unrelated to graphdriver.
Signed-off-by: Vincent Batts <vbatts@redhat.com>
| ... | ... |
@@ -7,7 +7,6 @@ import ( |
| 7 | 7 |
"path" |
| 8 | 8 |
|
| 9 | 9 |
"github.com/docker/docker/pkg/archive" |
| 10 |
- "github.com/docker/docker/pkg/mount" |
|
| 11 | 10 |
) |
| 12 | 11 |
|
| 13 | 12 |
type FsMagic uint64 |
| ... | ... |
@@ -139,18 +138,3 @@ func New(root string, options []string) (driver Driver, err error) {
|
| 139 | 139 |
} |
| 140 | 140 |
return nil, fmt.Errorf("No supported storage backend found")
|
| 141 | 141 |
} |
| 142 |
- |
|
| 143 |
-func MakePrivate(mountPoint string) error {
|
|
| 144 |
- mounted, err := mount.Mounted(mountPoint) |
|
| 145 |
- if err != nil {
|
|
| 146 |
- return err |
|
| 147 |
- } |
|
| 148 |
- |
|
| 149 |
- if !mounted {
|
|
| 150 |
- if err := mount.Mount(mountPoint, mountPoint, "none", "bind,rw"); err != nil {
|
|
| 151 |
- return err |
|
| 152 |
- } |
|
| 153 |
- } |
|
| 154 |
- |
|
| 155 |
- return mount.ForceMount("", mountPoint, "none", "private")
|
|
| 156 |
-} |
| 157 | 142 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,18 @@ |
| 0 |
+// +build linux |
|
| 1 |
+ |
|
| 2 |
+package mount |
|
| 3 |
+ |
|
| 4 |
+func MakePrivate(mountPoint string) error {
|
|
| 5 |
+ mounted, err := Mounted(mountPoint) |
|
| 6 |
+ if err != nil {
|
|
| 7 |
+ return err |
|
| 8 |
+ } |
|
| 9 |
+ |
|
| 10 |
+ if !mounted {
|
|
| 11 |
+ if err := Mount(mountPoint, mountPoint, "none", "bind,rw"); err != nil {
|
|
| 12 |
+ return err |
|
| 13 |
+ } |
|
| 14 |
+ } |
|
| 15 |
+ |
|
| 16 |
+ return ForceMount("", mountPoint, "none", "private")
|
|
| 17 |
+} |