aboutsummaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'pkg')
-rw-r--r--pkg/api/handlers/compat/info.go3
-rw-r--r--pkg/domain/infra/abi/containers.go3
-rw-r--r--pkg/domain/infra/abi/images.go2
-rw-r--r--pkg/util/utils_linux.go5
4 files changed, 5 insertions, 8 deletions
diff --git a/pkg/api/handlers/compat/info.go b/pkg/api/handlers/compat/info.go
index d82513284..60bbd40fe 100644
--- a/pkg/api/handlers/compat/info.go
+++ b/pkg/api/handlers/compat/info.go
@@ -2,7 +2,6 @@ package compat
import (
"fmt"
- "io/ioutil"
"net/http"
"os"
goRuntime "runtime"
@@ -198,7 +197,7 @@ func getRuntimes(configInfo *config.Config) map[string]docker.Runtime {
func getFdCount() (count int) {
count = -1
- if entries, err := ioutil.ReadDir("/proc/self/fd"); err == nil {
+ if entries, err := os.ReadDir("/proc/self/fd"); err == nil {
count = len(entries)
}
return
diff --git a/pkg/domain/infra/abi/containers.go b/pkg/domain/infra/abi/containers.go
index dfa3c5ba0..569fe8133 100644
--- a/pkg/domain/infra/abi/containers.go
+++ b/pkg/domain/infra/abi/containers.go
@@ -4,7 +4,6 @@ import (
"context"
"errors"
"fmt"
- "io/ioutil"
"os"
"strconv"
"sync"
@@ -858,7 +857,7 @@ func makeExecConfig(options entities.ExecOptions, rt *libpod.Runtime) (*libpod.E
func checkExecPreserveFDs(options entities.ExecOptions) error {
if options.PreserveFDs > 0 {
- entries, err := ioutil.ReadDir("/proc/self/fd")
+ entries, err := os.ReadDir("/proc/self/fd")
if err != nil {
return err
}
diff --git a/pkg/domain/infra/abi/images.go b/pkg/domain/infra/abi/images.go
index f9839f62f..3030bac20 100644
--- a/pkg/domain/infra/abi/images.go
+++ b/pkg/domain/infra/abi/images.go
@@ -869,7 +869,7 @@ func execTransferPodman(execUser *user.User, command []string, needToTag bool) (
func getSigFilename(sigStoreDirPath string) (string, error) {
sigFileSuffix := 1
- sigFiles, err := ioutil.ReadDir(sigStoreDirPath)
+ sigFiles, err := os.ReadDir(sigStoreDirPath)
if err != nil {
return "", err
}
diff --git a/pkg/util/utils_linux.go b/pkg/util/utils_linux.go
index e2d9e3e89..7b2d98666 100644
--- a/pkg/util/utils_linux.go
+++ b/pkg/util/utils_linux.go
@@ -4,7 +4,6 @@ import (
"errors"
"fmt"
"io/fs"
- "io/ioutil"
"os"
"path/filepath"
"strings"
@@ -119,7 +118,7 @@ func AddPrivilegedDevices(g *generate.Generator) error {
// based on getDevices from runc (libcontainer/devices/devices.go)
func getDevices(path string) ([]spec.LinuxDevice, error) {
- files, err := ioutil.ReadDir(path)
+ files, err := os.ReadDir(path)
if err != nil {
if rootless.IsRootless() && os.IsPermission(err) {
return nil, nil
@@ -146,7 +145,7 @@ func getDevices(path string) ([]spec.LinuxDevice, error) {
}
case f.Name() == "console":
continue
- case f.Mode()&os.ModeSymlink != 0:
+ case f.Type()&os.ModeSymlink != 0:
continue
}