From 5e962dd8ba892ee234621c4c6188facfe0bc9d68 Mon Sep 17 00:00:00 2001 From: "Justin Terry (VM)" Date: Mon, 13 May 2019 12:35:22 -0700 Subject: [PATCH] Remove unused Resize method from initState Signed-off-by: Justin Terry (VM) --- runtime/v1/linux/proc/init.go | 7 ------- runtime/v1/linux/proc/init_state.go | 22 ---------------------- 2 files changed, 29 deletions(-) diff --git a/runtime/v1/linux/proc/init.go b/runtime/v1/linux/proc/init.go index 10787ed87829..c6a09575acde 100644 --- a/runtime/v1/linux/proc/init.go +++ b/runtime/v1/linux/proc/init.go @@ -324,13 +324,6 @@ func (p *Init) Resize(ws console.WinSize) error { return p.console.Resize(ws) } -func (p *Init) resize(ws console.WinSize) error { - if p.console == nil { - return nil - } - return p.console.Resize(ws) -} - // Pause the init process and all its child processes func (p *Init) Pause(ctx context.Context) error { p.mu.Lock() diff --git a/runtime/v1/linux/proc/init_state.go b/runtime/v1/linux/proc/init_state.go index 51849c62b4f6..0d1c8dcf26bb 100644 --- a/runtime/v1/linux/proc/init_state.go +++ b/runtime/v1/linux/proc/init_state.go @@ -21,7 +21,6 @@ package proc import ( "context" - "github.com/containerd/console" "github.com/containerd/containerd/runtime/proc" runc "github.com/containerd/go-runc" google_protobuf "github.com/gogo/protobuf/types" @@ -30,7 +29,6 @@ import ( ) type initState interface { - Resize(console.WinSize) error Start(context.Context) error Delete(context.Context) error Pause(context.Context) error @@ -76,10 +74,6 @@ func (s *createdState) Checkpoint(ctx context.Context, r *CheckpointConfig) erro return errors.Errorf("cannot checkpoint a task in created state") } -func (s *createdState) Resize(ws console.WinSize) error { - return s.p.resize(ws) -} - func (s *createdState) Start(ctx context.Context) error { if err := s.p.start(ctx); err != nil { return err @@ -145,10 +139,6 @@ func (s *createdCheckpointState) Checkpoint(ctx context.Context, r *CheckpointCo return errors.Errorf("cannot checkpoint a task in created state") } -func (s *createdCheckpointState) Resize(ws console.WinSize) error { - return s.p.resize(ws) -} - func (s *createdCheckpointState) Start(ctx context.Context) error { p := s.p sio := p.stdio @@ -255,10 +245,6 @@ func (s *runningState) Checkpoint(ctx context.Context, r *CheckpointConfig) erro return s.p.checkpoint(ctx, r) } -func (s *runningState) Resize(ws console.WinSize) error { - return s.p.resize(ws) -} - func (s *runningState) Start(ctx context.Context) error { return errors.Errorf("cannot start a running process") } @@ -319,10 +305,6 @@ func (s *pausedState) Checkpoint(ctx context.Context, r *CheckpointConfig) error return s.p.checkpoint(ctx, r) } -func (s *pausedState) Resize(ws console.WinSize) error { - return s.p.resize(ws) -} - func (s *pausedState) Start(ctx context.Context) error { return errors.Errorf("cannot start a paused process") } @@ -381,10 +363,6 @@ func (s *stoppedState) Checkpoint(ctx context.Context, r *CheckpointConfig) erro return errors.Errorf("cannot checkpoint a stopped container") } -func (s *stoppedState) Resize(ws console.WinSize) error { - return errors.Errorf("cannot resize a stopped container") -} - func (s *stoppedState) Start(ctx context.Context) error { return errors.Errorf("cannot start a stopped process") }