Merge pull request #3848 from dgageot/remove-more-dead-code-pkg

Remove dead or redundant code (packages)
This commit is contained in:
Avi Deitcher
2022-10-10 20:55:02 +03:00
committed by GitHub
12 changed files with 12 additions and 12 deletions

View File

@@ -11,7 +11,7 @@ import (
"github.com/containerd/containerd"
"github.com/containerd/containerd/cio"
"github.com/containerd/containerd/namespaces"
specs "github.com/opencontainers/runtime-spec/specs-go"
"github.com/opencontainers/runtime-spec/specs-go"
log "github.com/sirupsen/logrus"
)

View File

@@ -292,7 +292,7 @@ func prepareProcess(pid int, runtime Runtime) error {
move = true
}
if move {
if err := netlink.LinkSetNsPid(link, int(pid)); err != nil {
if err := netlink.LinkSetNsPid(link, pid); err != nil {
return fmt.Errorf("Cannot move interface %s into namespace: %v", iface.Name, err)
}
fmt.Fprintf(os.Stderr, "Moved interface %s to pid %d\n", iface.Name, pid)