...
1 package configs
2
3 import "golang.org/x/sys/unix"
4
5 const (
6
7
8 EXT_COPYUP = 1 << iota
9 )
10
11 type Mount struct {
12
13 Source string `json:"source"`
14
15
16 Destination string `json:"destination"`
17
18
19 Device string `json:"device"`
20
21
22 Flags int `json:"flags"`
23
24
25 PropagationFlags []int `json:"propagation_flags"`
26
27
28 Data string `json:"data"`
29
30
31 Relabel string `json:"relabel"`
32
33
34 RecAttr *unix.MountAttr `json:"rec_attr"`
35
36
37 Extensions int `json:"extensions"`
38
39
40 PremountCmds []Command `json:"premount_cmds"`
41
42
43 PostmountCmds []Command `json:"postmount_cmds"`
44 }
45
46 func (m *Mount) IsBind() bool {
47 return m.Flags&unix.MS_BIND != 0
48 }
49
View as plain text