Signed-off-by: John Howard <jhoward@microsoft.com>
| ... | ... |
@@ -1,20 +1,22 @@ |
| 1 |
+// +build linux |
|
| 2 |
+ |
|
| 1 | 3 |
/* |
| 2 | 4 |
|
| 3 | 5 |
aufs driver directory structure |
| 4 | 6 |
|
| 5 |
-. |
|
| 6 |
-├── layers // Metadata of layers |
|
| 7 |
-│ ├── 1 |
|
| 8 |
-│ ├── 2 |
|
| 9 |
-│ └── 3 |
|
| 10 |
-├── diff // Content of the layer |
|
| 11 |
-│ ├── 1 // Contains layers that need to be mounted for the id |
|
| 12 |
-│ ├── 2 |
|
| 13 |
-│ └── 3 |
|
| 14 |
-└── mnt // Mount points for the rw layers to be mounted |
|
| 15 |
- ├── 1 |
|
| 16 |
- ├── 2 |
|
| 17 |
- └── 3 |
|
| 7 |
+ . |
|
| 8 |
+ ├── layers // Metadata of layers |
|
| 9 |
+ │ ├── 1 |
|
| 10 |
+ │ ├── 2 |
|
| 11 |
+ │ └── 3 |
|
| 12 |
+ ├── diff // Content of the layer |
|
| 13 |
+ │ ├── 1 // Contains layers that need to be mounted for the id |
|
| 14 |
+ │ ├── 2 |
|
| 15 |
+ │ └── 3 |
|
| 16 |
+ └── mnt // Mount points for the rw layers to be mounted |
|
| 17 |
+ ├── 1 |
|
| 18 |
+ ├── 2 |
|
| 19 |
+ └── 3 |
|
| 18 | 20 |
|
| 19 | 21 |
*/ |
| 20 | 22 |
|
| ... | ... |
@@ -7,5 +7,5 @@ import "errors" |
| 7 | 7 |
const MsRemount = 0 |
| 8 | 8 |
|
| 9 | 9 |
func mount(source string, target string, fstype string, flags uintptr, data string) (err error) {
|
| 10 |
- return errors.New("mount is not implemented on darwin")
|
|
| 10 |
+ return errors.New("mount is not implemented on this platform")
|
|
| 11 | 11 |
} |
| ... | ... |
@@ -1,3 +1,5 @@ |
| 1 |
+// +build linux |
|
| 2 |
+ |
|
| 1 | 3 |
package vfs |
| 2 | 4 |
|
| 3 | 5 |
import ( |
| ... | ... |
@@ -7,6 +9,7 @@ import ( |
| 7 | 7 |
|
| 8 | 8 |
"github.com/docker/docker/daemon/graphdriver" |
| 9 | 9 |
"github.com/docker/docker/pkg/chrootarchive" |
| 10 |
+ "github.com/docker/docker/pkg/system" |
|
| 10 | 11 |
"github.com/docker/libcontainer/label" |
| 11 | 12 |
) |
| 12 | 13 |
|
| ... | ... |
@@ -39,7 +42,7 @@ func (d *Driver) Cleanup() error {
|
| 39 | 39 |
|
| 40 | 40 |
func (d *Driver) Create(id, parent string) error {
|
| 41 | 41 |
dir := d.dir(id) |
| 42 |
- if err := os.MkdirAll(path.Dir(dir), 0700); err != nil {
|
|
| 42 |
+ if err := system.MkdirAll(path.Dir(dir), 0700); err != nil {
|
|
| 43 | 43 |
return err |
| 44 | 44 |
} |
| 45 | 45 |
if err := os.Mkdir(dir, 0755); err != nil {
|