Browse code

Windows: Don't build Linux graph drivers

Signed-off-by: John Howard <jhoward@microsoft.com>

John Howard authored on 2015/04/27 23:53:12
Showing 17 changed files
... ...
@@ -1,4 +1,4 @@
1
-// +build !exclude_graphdriver_aufs
1
+// +build !exclude_graphdriver_aufs,linux
2 2
 
3 3
 package daemon
4 4
 
... ...
@@ -1,4 +1,4 @@
1
-// +build !exclude_graphdriver_btrfs
1
+// +build !exclude_graphdriver_btrfs,linux
2 2
 
3 3
 package daemon
4 4
 
... ...
@@ -1,4 +1,4 @@
1
-// +build !exclude_graphdriver_devicemapper
1
+// +build !exclude_graphdriver_devicemapper,linux
2 2
 
3 3
 package daemon
4 4
 
... ...
@@ -1,4 +1,4 @@
1
-// +build exclude_graphdriver_aufs
1
+// +build exclude_graphdriver_aufs,linux
2 2
 
3 3
 package daemon
4 4
 
... ...
@@ -1,4 +1,4 @@
1
-// +build !exclude_graphdriver_overlay
1
+// +build !exclude_graphdriver_overlay,linux
2 2
 
3 3
 package daemon
4 4
 
... ...
@@ -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
 
... ...
@@ -1,3 +1,5 @@
1
+// +build linux
2
+
1 3
 package aufs
2 4
 
3 5
 import (
... ...
@@ -1,3 +1,5 @@
1
+// +build linux
2
+
1 3
 package aufs
2 4
 
3 5
 import (
... ...
@@ -1,3 +1,5 @@
1
+// +build linux
2
+
1 3
 package aufs
2 4
 
3 5
 import (
... ...
@@ -1,3 +1,5 @@
1
+// +build linux
2
+
1 3
 package aufs
2 4
 
3 5
 import (
... ...
@@ -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 btrfs
2 4
 
3 5
 import (
... ...
@@ -1,3 +1,5 @@
1
+// +build linux
2
+
1 3
 package overlay
2 4
 
3 5
 import (
4 6
new file mode 100644
... ...
@@ -0,0 +1,3 @@
0
+// +build !linux
1
+
2
+package overlay
... ...
@@ -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 {
46 46
new file mode 100644
... ...
@@ -0,0 +1,3 @@
0
+// +build !linux
1
+
2
+package vfs
... ...
@@ -1,3 +1,5 @@
1
+// +build linux
2
+
1 3
 package vfs
2 4
 
3 5
 import (