Skip to content

Commit

Permalink
Move spec.Linux.IntelRdt check to spec.Linux != nil block
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan Marler <johnnymarler@gmail.com>
  • Loading branch information
marler8997 committed Oct 5, 2018
1 parent 70ca035 commit 1499c74
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions libcontainer/specconv/spec_linux.go
Expand Up @@ -239,6 +239,12 @@ func CreateLibcontainerConfig(opts *CreateOpts) (*configs.Config, error) {
}
config.Seccomp = seccomp
}
if spec.Linux.IntelRdt != nil {
config.IntelRdt = &configs.IntelRdt{}
if spec.Linux.IntelRdt.L3CacheSchema != "" {
config.IntelRdt.L3CacheSchema = spec.Linux.IntelRdt.L3CacheSchema
}
}
}
if spec.Process.SelinuxLabel != "" {
config.ProcessLabel = spec.Process.SelinuxLabel
Expand All @@ -257,12 +263,6 @@ func CreateLibcontainerConfig(opts *CreateOpts) (*configs.Config, error) {
}
createHooks(spec, config)
config.Version = specs.Version
if spec.Linux.IntelRdt != nil {
config.IntelRdt = &configs.IntelRdt{}
if spec.Linux.IntelRdt.L3CacheSchema != "" {
config.IntelRdt.L3CacheSchema = spec.Linux.IntelRdt.L3CacheSchema
}
}
return config, nil
}

Expand Down

0 comments on commit 1499c74

Please sign in to comment.