Skip to content

Commit 5e962dd

Browse files
committed
Remove unused Resize method from initState
Signed-off-by: Justin Terry (VM) <[email protected]>
1 parent 7acdb16 commit 5e962dd

2 files changed

Lines changed: 0 additions & 29 deletions

File tree

runtime/v1/linux/proc/init.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -324,13 +324,6 @@ func (p *Init) Resize(ws console.WinSize) error {
324324
return p.console.Resize(ws)
325325
}
326326

327-
func (p *Init) resize(ws console.WinSize) error {
328-
if p.console == nil {
329-
return nil
330-
}
331-
return p.console.Resize(ws)
332-
}
333-
334327
// Pause the init process and all its child processes
335328
func (p *Init) Pause(ctx context.Context) error {
336329
p.mu.Lock()

runtime/v1/linux/proc/init_state.go

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ package proc
2121
import (
2222
"context"
2323

24-
"github.com/containerd/console"
2524
"github.com/containerd/containerd/runtime/proc"
2625
runc "github.com/containerd/go-runc"
2726
google_protobuf "github.com/gogo/protobuf/types"
@@ -30,7 +29,6 @@ import (
3029
)
3130

3231
type initState interface {
33-
Resize(console.WinSize) error
3432
Start(context.Context) error
3533
Delete(context.Context) error
3634
Pause(context.Context) error
@@ -76,10 +74,6 @@ func (s *createdState) Checkpoint(ctx context.Context, r *CheckpointConfig) erro
7674
return errors.Errorf("cannot checkpoint a task in created state")
7775
}
7876

79-
func (s *createdState) Resize(ws console.WinSize) error {
80-
return s.p.resize(ws)
81-
}
82-
8377
func (s *createdState) Start(ctx context.Context) error {
8478
if err := s.p.start(ctx); err != nil {
8579
return err
@@ -145,10 +139,6 @@ func (s *createdCheckpointState) Checkpoint(ctx context.Context, r *CheckpointCo
145139
return errors.Errorf("cannot checkpoint a task in created state")
146140
}
147141

148-
func (s *createdCheckpointState) Resize(ws console.WinSize) error {
149-
return s.p.resize(ws)
150-
}
151-
152142
func (s *createdCheckpointState) Start(ctx context.Context) error {
153143
p := s.p
154144
sio := p.stdio
@@ -255,10 +245,6 @@ func (s *runningState) Checkpoint(ctx context.Context, r *CheckpointConfig) erro
255245
return s.p.checkpoint(ctx, r)
256246
}
257247

258-
func (s *runningState) Resize(ws console.WinSize) error {
259-
return s.p.resize(ws)
260-
}
261-
262248
func (s *runningState) Start(ctx context.Context) error {
263249
return errors.Errorf("cannot start a running process")
264250
}
@@ -319,10 +305,6 @@ func (s *pausedState) Checkpoint(ctx context.Context, r *CheckpointConfig) error
319305
return s.p.checkpoint(ctx, r)
320306
}
321307

322-
func (s *pausedState) Resize(ws console.WinSize) error {
323-
return s.p.resize(ws)
324-
}
325-
326308
func (s *pausedState) Start(ctx context.Context) error {
327309
return errors.Errorf("cannot start a paused process")
328310
}
@@ -381,10 +363,6 @@ func (s *stoppedState) Checkpoint(ctx context.Context, r *CheckpointConfig) erro
381363
return errors.Errorf("cannot checkpoint a stopped container")
382364
}
383365

384-
func (s *stoppedState) Resize(ws console.WinSize) error {
385-
return errors.Errorf("cannot resize a stopped container")
386-
}
387-
388366
func (s *stoppedState) Start(ctx context.Context) error {
389367
return errors.Errorf("cannot start a stopped process")
390368
}

0 commit comments

Comments
 (0)