File tree Expand file tree Collapse file tree 3 files changed +70
-35
lines changed Expand file tree Collapse file tree 3 files changed +70
-35
lines changed Original file line number Diff line number Diff line change 1
1
package configs
2
2
3
- import "golang.org/x/sys/unix"
4
-
5
3
const (
6
4
// EXT_COPYUP is a directive to copy up the contents of a directory when
7
5
// a tmpfs is mounted over it.
8
6
EXT_COPYUP = 1 << iota //nolint:golint // ignore "don't use ALL_CAPS" warning
9
7
)
10
-
11
- type Mount struct {
12
- // Source path for the mount.
13
- Source string `json:"source"`
14
-
15
- // Destination path for the mount inside the container.
16
- Destination string `json:"destination"`
17
-
18
- // Device the mount is for.
19
- Device string `json:"device"`
20
-
21
- // Mount flags.
22
- Flags int `json:"flags"`
23
-
24
- // Propagation Flags
25
- PropagationFlags []int `json:"propagation_flags"`
26
-
27
- // Mount data applied to the mount.
28
- Data string `json:"data"`
29
-
30
- // Relabel source if set, "z" indicates shared, "Z" indicates unshared.
31
- Relabel string `json:"relabel"`
32
-
33
- // RecAttr represents mount properties to be applied recursively (AT_RECURSIVE), see mount_setattr(2).
34
- RecAttr * unix.MountAttr `json:"rec_attr"`
35
-
36
- // Extensions are additional flags that are specific to runc.
37
- Extensions int `json:"extensions"`
38
- }
39
-
40
- func (m * Mount ) IsBind () bool {
41
- return m .Flags & unix .MS_BIND != 0
42
- }
Original file line number Diff line number Diff line change
1
+ package configs
2
+
3
+ import "golang.org/x/sys/unix"
4
+
5
+ type Mount struct {
6
+ // Source path for the mount.
7
+ Source string `json:"source"`
8
+
9
+ // Destination path for the mount inside the container.
10
+ Destination string `json:"destination"`
11
+
12
+ // Device the mount is for.
13
+ Device string `json:"device"`
14
+
15
+ // Mount flags.
16
+ Flags int `json:"flags"`
17
+
18
+ // Propagation Flags
19
+ PropagationFlags []int `json:"propagation_flags"`
20
+
21
+ // Mount data applied to the mount.
22
+ Data string `json:"data"`
23
+
24
+ // Relabel source if set, "z" indicates shared, "Z" indicates unshared.
25
+ Relabel string `json:"relabel"`
26
+
27
+ // RecAttr represents mount properties to be applied recursively (AT_RECURSIVE), see mount_setattr(2).
28
+ RecAttr * unix.MountAttr `json:"rec_attr"`
29
+
30
+ // Extensions are additional flags that are specific to runc.
31
+ Extensions int `json:"extensions"`
32
+ }
33
+
34
+ func (m * Mount ) IsBind () bool {
35
+ return m .Flags & unix .MS_BIND != 0
36
+ }
Original file line number Diff line number Diff line change
1
+ //go:build !linux
2
+ // +build !linux
3
+
4
+ package configs
5
+
6
+ type Mount struct {
7
+ // Source path for the mount.
8
+ Source string `json:"source"`
9
+
10
+ // Destination path for the mount inside the container.
11
+ Destination string `json:"destination"`
12
+
13
+ // Device the mount is for.
14
+ Device string `json:"device"`
15
+
16
+ // Mount flags.
17
+ Flags int `json:"flags"`
18
+
19
+ // Propagation Flags
20
+ PropagationFlags []int `json:"propagation_flags"`
21
+
22
+ // Mount data applied to the mount.
23
+ Data string `json:"data"`
24
+
25
+ // Relabel source if set, "z" indicates shared, "Z" indicates unshared.
26
+ Relabel string `json:"relabel"`
27
+
28
+ // Extensions are additional flags that are specific to runc.
29
+ Extensions int `json:"extensions"`
30
+ }
31
+
32
+ func (m * Mount ) IsBind () bool {
33
+ return false
34
+ }
You can’t perform that action at this time.
0 commit comments