Skip to content

Commit

Permalink
Remove unused Resize method from initState
Browse files Browse the repository at this point in the history
Signed-off-by: Justin Terry (VM) <juterry@microsoft.com>
  • Loading branch information
jterry75 committed May 13, 2019
1 parent 7acdb16 commit 5e962dd
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 29 deletions.
7 changes: 0 additions & 7 deletions runtime/v1/linux/proc/init.go
Expand Up @@ -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()
Expand Down
22 changes: 0 additions & 22 deletions runtime/v1/linux/proc/init_state.go
Expand Up @@ -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"
Expand All @@ -30,7 +29,6 @@ import (
)

type initState interface {
Resize(console.WinSize) error
Start(context.Context) error
Delete(context.Context) error
Pause(context.Context) error
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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")
}
Expand Down Expand Up @@ -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")
}
Expand Down Expand Up @@ -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")
}
Expand Down

0 comments on commit 5e962dd

Please sign in to comment.