libct/specconv: rm empty key from mountPropagationMapping
It is a tad cleaner this way.
@@ -60,7 +60,6 @@ func initMaps() {
"shared": unix.MS_SHARED,
"runbindable": unix.MS_UNBINDABLE | unix.MS_REC,
"unbindable": unix.MS_UNBINDABLE,
- "": 0,
}
mountFlags = map[string]struct {
@@ -159,10 +158,8 @@ func KnownMountOptions() []string {
res = append(res, k)
}
for k := range mountPropagationMapping {
- if k != "" {
res = append(res, k)
}
- }
for k := range recAttrFlags {
res = append(res, k)
}
@@ -385,6 +382,7 @@ func CreateLibcontainerConfig(opts *CreateOpts) (*configs.Config, error) {
if spec.Linux != nil {
initMaps()
+ if spec.Linux.RootfsPropagation != "" {
var exists bool
if config.RootPropagation, exists = mountPropagationMapping[spec.Linux.RootfsPropagation]; !exists {
return nil, fmt.Errorf("rootfsPropagation=%v is not supported", spec.Linux.RootfsPropagation)
@@ -392,6 +390,7 @@ func CreateLibcontainerConfig(opts *CreateOpts) (*configs.Config, error) {
if config.NoPivotRoot && (config.RootPropagation&unix.MS_PRIVATE != 0) {
return nil, errors.New("rootfsPropagation of [r]private is not safe without pivot_root")
}
+ }
for _, ns := range spec.Linux.Namespaces {
t, exists := namespaceMapping[ns.Type]
