Sort mount flags so it's easier to be found
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
This commit is contained in:
parent
a88b26d3ac
commit
0b2fb3edb5
56
spec.go
56
spec.go
|
@ -340,39 +340,39 @@ func parseMountOptions(options string) (int, string) {
|
||||||
clear bool
|
clear bool
|
||||||
flag int
|
flag int
|
||||||
}{
|
}{
|
||||||
"defaults": {false, 0},
|
|
||||||
"ro": {false, syscall.MS_RDONLY},
|
|
||||||
"rw": {true, syscall.MS_RDONLY},
|
|
||||||
"suid": {true, syscall.MS_NOSUID},
|
|
||||||
"nosuid": {false, syscall.MS_NOSUID},
|
|
||||||
"dev": {true, syscall.MS_NODEV},
|
|
||||||
"nodev": {false, syscall.MS_NODEV},
|
|
||||||
"exec": {true, syscall.MS_NOEXEC},
|
|
||||||
"noexec": {false, syscall.MS_NOEXEC},
|
|
||||||
"sync": {false, syscall.MS_SYNCHRONOUS},
|
|
||||||
"async": {true, syscall.MS_SYNCHRONOUS},
|
"async": {true, syscall.MS_SYNCHRONOUS},
|
||||||
"dirsync": {false, syscall.MS_DIRSYNC},
|
|
||||||
"remount": {false, syscall.MS_REMOUNT},
|
|
||||||
"mand": {false, syscall.MS_MANDLOCK},
|
|
||||||
"nomand": {true, syscall.MS_MANDLOCK},
|
|
||||||
"atime": {true, syscall.MS_NOATIME},
|
"atime": {true, syscall.MS_NOATIME},
|
||||||
"noatime": {false, syscall.MS_NOATIME},
|
|
||||||
"diratime": {true, syscall.MS_NODIRATIME},
|
|
||||||
"nodiratime": {false, syscall.MS_NODIRATIME},
|
|
||||||
"bind": {false, syscall.MS_BIND},
|
"bind": {false, syscall.MS_BIND},
|
||||||
"rbind": {false, syscall.MS_BIND | syscall.MS_REC},
|
"defaults": {false, 0},
|
||||||
"unbindable": {false, syscall.MS_UNBINDABLE},
|
"dev": {true, syscall.MS_NODEV},
|
||||||
"runbindable": {false, syscall.MS_UNBINDABLE | syscall.MS_REC},
|
"diratime": {true, syscall.MS_NODIRATIME},
|
||||||
"private": {false, syscall.MS_PRIVATE},
|
"dirsync": {false, syscall.MS_DIRSYNC},
|
||||||
"rprivate": {false, syscall.MS_PRIVATE | syscall.MS_REC},
|
"exec": {true, syscall.MS_NOEXEC},
|
||||||
"shared": {false, syscall.MS_SHARED},
|
"mand": {false, syscall.MS_MANDLOCK},
|
||||||
"rshared": {false, syscall.MS_SHARED | syscall.MS_REC},
|
"noatime": {false, syscall.MS_NOATIME},
|
||||||
"slave": {false, syscall.MS_SLAVE},
|
"nodev": {false, syscall.MS_NODEV},
|
||||||
"rslave": {false, syscall.MS_SLAVE | syscall.MS_REC},
|
"nodiratime": {false, syscall.MS_NODIRATIME},
|
||||||
"relatime": {false, syscall.MS_RELATIME},
|
"noexec": {false, syscall.MS_NOEXEC},
|
||||||
|
"nomand": {true, syscall.MS_MANDLOCK},
|
||||||
"norelatime": {true, syscall.MS_RELATIME},
|
"norelatime": {true, syscall.MS_RELATIME},
|
||||||
"strictatime": {false, syscall.MS_STRICTATIME},
|
|
||||||
"nostrictatime": {true, syscall.MS_STRICTATIME},
|
"nostrictatime": {true, syscall.MS_STRICTATIME},
|
||||||
|
"nosuid": {false, syscall.MS_NOSUID},
|
||||||
|
"private": {false, syscall.MS_PRIVATE},
|
||||||
|
"rbind": {false, syscall.MS_BIND | syscall.MS_REC},
|
||||||
|
"relatime": {false, syscall.MS_RELATIME},
|
||||||
|
"remount": {false, syscall.MS_REMOUNT},
|
||||||
|
"ro": {false, syscall.MS_RDONLY},
|
||||||
|
"rprivate": {false, syscall.MS_PRIVATE | syscall.MS_REC},
|
||||||
|
"rshared": {false, syscall.MS_SHARED | syscall.MS_REC},
|
||||||
|
"rslave": {false, syscall.MS_SLAVE | syscall.MS_REC},
|
||||||
|
"runbindable": {false, syscall.MS_UNBINDABLE | syscall.MS_REC},
|
||||||
|
"rw": {true, syscall.MS_RDONLY},
|
||||||
|
"shared": {false, syscall.MS_SHARED},
|
||||||
|
"slave": {false, syscall.MS_SLAVE},
|
||||||
|
"strictatime": {false, syscall.MS_STRICTATIME},
|
||||||
|
"suid": {true, syscall.MS_NOSUID},
|
||||||
|
"sync": {false, syscall.MS_SYNCHRONOUS},
|
||||||
|
"unbindable": {false, syscall.MS_UNBINDABLE},
|
||||||
}
|
}
|
||||||
for _, o := range strings.Split(options, ",") {
|
for _, o := range strings.Split(options, ",") {
|
||||||
// If the option does not exist in the flags table or the flag
|
// If the option does not exist in the flags table or the flag
|
||||||
|
|
Loading…
Reference in New Issue