Skip to content

Commit

Permalink
utils: use GetRuntimeDir() from c/storage
Browse files Browse the repository at this point in the history
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
  • Loading branch information
giuseppe committed Nov 14, 2023
1 parent 24a50a2 commit a199c35
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 108 deletions.
3 changes: 1 addition & 2 deletions pkg/config/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
nettypes "github.com/containers/common/libnetwork/types"
"github.com/containers/common/pkg/apparmor"
"github.com/containers/common/pkg/cgroupv2"
"github.com/containers/common/pkg/util"
"github.com/containers/storage/pkg/homedir"
"github.com/containers/storage/pkg/unshare"
"github.com/containers/storage/types"
Expand Down Expand Up @@ -484,7 +483,7 @@ func defaultTmpDir() (string, error) {
return getLibpodTmpDir(), nil
}

runtimeDir, err := util.GetRuntimeDir()
runtimeDir, err := homedir.GetRuntimeDir()
if err != nil {
return "", err
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/netns/netns_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
"sync"

"github.com/containernetworking/plugins/pkg/ns"
"github.com/containers/common/pkg/util"
"github.com/containers/storage/pkg/homedir"
"github.com/containers/storage/pkg/unshare"
"github.com/sirupsen/logrus"
"golang.org/x/sys/unix"
Expand All @@ -40,7 +40,7 @@ import (
// rootless, it needs to be at a location writable by user.
func GetNSRunDir() (string, error) {
if unshare.IsRootless() {
rootlessDir, err := util.GetRuntimeDir()
rootlessDir, err := homedir.GetRuntimeDir()
if err != nil {
return "", err
}
Expand Down
91 changes: 0 additions & 91 deletions pkg/util/util_supported.go

This file was deleted.

13 changes: 0 additions & 13 deletions pkg/util/util_windows.go

This file was deleted.

0 comments on commit a199c35

Please sign in to comment.