diff options
Diffstat (limited to 'pkg/util')
-rw-r--r-- | pkg/util/utils_linux.go | 5 |
1 files changed, 2 insertions, 3 deletions
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 } |