summaryrefslogtreecommitdiff
path: root/pkg/api/handlers/compat
diff options
context:
space:
mode:
authoropenshift-ci[bot] <75433959+openshift-ci[bot]@users.noreply.github.com>2022-07-07 11:43:52 +0000
committerGitHub <noreply@github.com>2022-07-07 11:43:52 +0000
commitf3533a312fb4b2f0eb88e9d53fb31d1580b182a6 (patch)
tree35e1bc11a9c5e9ee4740d3af642b511fe0de65be /pkg/api/handlers/compat
parent13070dc186d4083aa2b4f55781cd79ea6d577022 (diff)
parentcc6faddfaaa7dad7e07e3113e14328d625636ace (diff)
downloadpodman-f3533a312fb4b2f0eb88e9d53fb31d1580b182a6.tar.gz
podman-f3533a312fb4b2f0eb88e9d53fb31d1580b182a6.tar.bz2
podman-f3533a312fb4b2f0eb88e9d53fb31d1580b182a6.zip
Merge pull request #14841 from Luap99/common-code
use c/common code for resize and CopyDetachable
Diffstat (limited to 'pkg/api/handlers/compat')
-rw-r--r--pkg/api/handlers/compat/exec.go5
-rw-r--r--pkg/api/handlers/compat/resize.go3
2 files changed, 5 insertions, 3 deletions
diff --git a/pkg/api/handlers/compat/exec.go b/pkg/api/handlers/compat/exec.go
index c7990f6e8..1b4dead8b 100644
--- a/pkg/api/handlers/compat/exec.go
+++ b/pkg/api/handlers/compat/exec.go
@@ -7,6 +7,7 @@ import (
"net/http"
"strings"
+ "github.com/containers/common/pkg/resize"
"github.com/containers/podman/v4/libpod"
"github.com/containers/podman/v4/libpod/define"
"github.com/containers/podman/v4/pkg/api/handlers"
@@ -176,9 +177,9 @@ func ExecStartHandler(w http.ResponseWriter, r *http.Request) {
logrus.Error(fmt.Errorf("error attaching to container %s exec session %s: %w", sessionCtr.ID(), sessionID, e))
}
- var size *define.TerminalSize
+ var size *resize.TerminalSize
if bodyParams.Tty && (bodyParams.Height > 0 || bodyParams.Width > 0) {
- size = &define.TerminalSize{
+ size = &resize.TerminalSize{
Height: bodyParams.Height,
Width: bodyParams.Width,
}
diff --git a/pkg/api/handlers/compat/resize.go b/pkg/api/handlers/compat/resize.go
index f5da306da..a2caf6e35 100644
--- a/pkg/api/handlers/compat/resize.go
+++ b/pkg/api/handlers/compat/resize.go
@@ -6,6 +6,7 @@ import (
"net/http"
"strings"
+ "github.com/containers/common/pkg/resize"
"github.com/containers/podman/v4/libpod"
"github.com/containers/podman/v4/libpod/define"
"github.com/containers/podman/v4/pkg/api/handlers/utils"
@@ -32,7 +33,7 @@ func ResizeTTY(w http.ResponseWriter, r *http.Request) {
return
}
- sz := define.TerminalSize{
+ sz := resize.TerminalSize{
Width: query.Width,
Height: query.Height,
}