summaryrefslogtreecommitdiffhomepage
path: root/runsc/cmd/checkpoint.go
diff options
context:
space:
mode:
authorFabricio Voznika <fvoznika@google.com>2019-06-18 14:45:50 -0700
committergVisor bot <gvisor-bot@google.com>2019-06-18 14:46:49 -0700
commitbdb19b82ef2aa1638d98da4b1c55ae7928437f55 (patch)
treee17a3827341aef639e058893c055dc164f1a247d /runsc/cmd/checkpoint.go
parent2e1379867a77bfa94cc740b6d1407d3702810c73 (diff)
Add Container/Sandbox args struct for creation
There were 3 string arguments that could be easily misplaced and it makes it easier to add new arguments, especially for Container that has dozens of callers. PiperOrigin-RevId: 253872074
Diffstat (limited to 'runsc/cmd/checkpoint.go')
-rw-r--r--runsc/cmd/checkpoint.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/runsc/cmd/checkpoint.go b/runsc/cmd/checkpoint.go
index 7298a0828..d8b3a8573 100644
--- a/runsc/cmd/checkpoint.go
+++ b/runsc/cmd/checkpoint.go
@@ -133,7 +133,12 @@ func (c *Checkpoint) Execute(_ context.Context, f *flag.FlagSet, args ...interfa
Fatalf("destroying container: %v", err)
}
- cont, err = container.Create(id, spec, conf, bundleDir, "", "", "")
+ contArgs := container.Args{
+ ID: id,
+ Spec: spec,
+ BundleDir: bundleDir,
+ }
+ cont, err = container.New(conf, contArgs)
if err != nil {
Fatalf("restoring container: %v", err)
}