mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-10 21:53:57 +08:00
Replace formatted errors when unneeded
Signed-off-by: John Hwang <John.F.Hwang@gmail.com>
This commit is contained in:
@@ -4,6 +4,7 @@ package main
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"strconv"
|
||||
@@ -274,11 +275,11 @@ other options are ignored.
|
||||
l3CacheSchema := context.String("l3-cache-schema")
|
||||
memBwSchema := context.String("mem-bw-schema")
|
||||
if l3CacheSchema != "" && !intelrdt.IsCatEnabled() {
|
||||
return fmt.Errorf("Intel RDT/CAT: l3 cache schema is not enabled")
|
||||
return errors.New("Intel RDT/CAT: l3 cache schema is not enabled")
|
||||
}
|
||||
|
||||
if memBwSchema != "" && !intelrdt.IsMbaEnabled() {
|
||||
return fmt.Errorf("Intel RDT/MBA: memory bandwidth schema is not enabled")
|
||||
return errors.New("Intel RDT/MBA: memory bandwidth schema is not enabled")
|
||||
}
|
||||
|
||||
if l3CacheSchema != "" || memBwSchema != "" {
|
||||
|
||||
Reference in New Issue
Block a user