mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Remove unused parameters
PiperOrigin-RevId: 549820338
This commit is contained in:
committed by
gVisor bot
parent
1ba123fff2
commit
d40be91ac3
@@ -144,7 +144,7 @@ func (c *Checkpoint) Execute(_ context.Context, f *flag.FlagSet, args ...any) su
|
||||
}
|
||||
defer cont.Destroy()
|
||||
|
||||
if err := cont.Restore(spec, conf, fullImagePath); err != nil {
|
||||
if err := cont.Restore(conf, fullImagePath); err != nil {
|
||||
util.Fatalf("starting container: %v", err)
|
||||
}
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@ func (r *Restore) Execute(_ context.Context, f *flag.FlagSet, args ...any) subco
|
||||
}
|
||||
|
||||
log.Debugf("Restore: %v", conf.RestoreFile)
|
||||
if err := c.Restore(runArgs.Spec, conf, conf.RestoreFile); err != nil {
|
||||
if err := c.Restore(conf, conf.RestoreFile); err != nil {
|
||||
return util.Errorf("starting container: %v", err)
|
||||
}
|
||||
|
||||
|
||||
@@ -432,7 +432,7 @@ func (c *Container) Start(conf *config.Config) error {
|
||||
}
|
||||
|
||||
if isRoot(c.Spec) {
|
||||
if err := c.Sandbox.StartRoot(c.Spec, conf); err != nil {
|
||||
if err := c.Sandbox.StartRoot(conf); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
@@ -502,7 +502,7 @@ func (c *Container) Start(conf *config.Config) error {
|
||||
|
||||
// Restore takes a container and replaces its kernel and file system
|
||||
// to restore a container from its state file.
|
||||
func (c *Container) Restore(spec *specs.Spec, conf *config.Config, restoreFile string) error {
|
||||
func (c *Container) Restore(conf *config.Config, restoreFile string) error {
|
||||
log.Debugf("Restore container, cid: %s", c.ID)
|
||||
if err := c.Saver.lock(BlockAcquire); err != nil {
|
||||
return err
|
||||
@@ -519,7 +519,7 @@ func (c *Container) Restore(spec *specs.Spec, conf *config.Config, restoreFile s
|
||||
log.Warningf("StartContainer hook skipped because running inside container namespace is not supported")
|
||||
}
|
||||
|
||||
if err := c.Sandbox.Restore(c.ID, spec, conf, restoreFile); err != nil {
|
||||
if err := c.Sandbox.Restore(conf, c.ID, restoreFile); err != nil {
|
||||
return err
|
||||
}
|
||||
c.changeStatus(Running)
|
||||
@@ -542,7 +542,7 @@ func Run(conf *config.Config, args Args) (unix.WaitStatus, error) {
|
||||
|
||||
if conf.RestoreFile != "" {
|
||||
log.Debugf("Restore: %v", conf.RestoreFile)
|
||||
if err := c.Restore(args.Spec, conf, conf.RestoreFile); err != nil {
|
||||
if err := c.Restore(conf, conf.RestoreFile); err != nil {
|
||||
return 0, fmt.Errorf("starting container: %v", err)
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -1108,7 +1108,7 @@ func TestCheckpointRestore(t *testing.T) {
|
||||
}
|
||||
defer cont2.Destroy()
|
||||
|
||||
if err := cont2.Restore(spec, conf, imagePath); err != nil {
|
||||
if err := cont2.Restore(conf, imagePath); err != nil {
|
||||
t.Fatalf("error restoring container: %v", err)
|
||||
}
|
||||
|
||||
@@ -1152,7 +1152,7 @@ func TestCheckpointRestore(t *testing.T) {
|
||||
}
|
||||
defer cont3.Destroy()
|
||||
|
||||
if err := cont3.Restore(spec, conf, imagePath); err != nil {
|
||||
if err := cont3.Restore(conf, imagePath); err != nil {
|
||||
t.Fatalf("error restoring container: %v", err)
|
||||
}
|
||||
|
||||
@@ -1287,7 +1287,7 @@ func TestUnixDomainSockets(t *testing.T) {
|
||||
}
|
||||
defer contRestore.Destroy()
|
||||
|
||||
if err := contRestore.Restore(spec, conf, imagePath); err != nil {
|
||||
if err := contRestore.Restore(conf, imagePath); err != nil {
|
||||
t.Fatalf("error restoring container: %v", err)
|
||||
}
|
||||
|
||||
|
||||
@@ -374,7 +374,7 @@ func (s *Sandbox) CreateSubcontainer(conf *config.Config, cid string, tty *os.Fi
|
||||
}
|
||||
|
||||
// StartRoot starts running the root container process inside the sandbox.
|
||||
func (s *Sandbox) StartRoot(spec *specs.Spec, conf *config.Config) error {
|
||||
func (s *Sandbox) StartRoot(conf *config.Config) error {
|
||||
pid := s.Pid.load()
|
||||
log.Debugf("Start root sandbox %q, PID: %d", s.ID, pid)
|
||||
conn, err := s.sandboxConnect()
|
||||
@@ -431,7 +431,7 @@ func (s *Sandbox) StartSubcontainer(spec *specs.Spec, conf *config.Config, cid s
|
||||
}
|
||||
|
||||
// Restore sends the restore call for a container in the sandbox.
|
||||
func (s *Sandbox) Restore(cid string, spec *specs.Spec, conf *config.Config, filename string) error {
|
||||
func (s *Sandbox) Restore(conf *config.Config, cid string, filename string) error {
|
||||
log.Debugf("Restore sandbox %q", s.ID)
|
||||
|
||||
rf, err := os.Open(filename)
|
||||
|
||||
Reference in New Issue
Block a user