Skip to content

Commit

Permalink
vfio hook: Import container state package as "specs" not "spec"
Browse files Browse the repository at this point in the history
That seems to be what the module "wants" to be called internally, so it
makes some errors less confusing this way.

Signed-off-by: David Gibson <[email protected]>
  • Loading branch information
dgibson committed Aug 12, 2020
1 parent 72c1a63 commit 51bfb85
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions vfio-hook/vfio-hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"strings"
"time"

spec "github.com/opencontainers/runtime-spec/specs-go"
specs "github.com/opencontainers/runtime-spec/specs-go"
"github.com/sirupsen/logrus"
)

Expand Down Expand Up @@ -73,15 +73,15 @@ func startVfioOciHook(force bool) error {

if !force {
//Force option will not be getting container spec since it's run standalone
var s spec.State
var s specs.State
reader := bufio.NewReader(os.Stdin)
decoder := json.NewDecoder(reader)
err := decoder.Decode(&s)
if err != nil {
return err
}

//log spec State to file
//log specs State to file
log.Debugf("Container state: %v", s)

//For Kata the config.json is in a different path
Expand Down

0 comments on commit 51bfb85

Please sign in to comment.