File tree Expand file tree Collapse file tree 2 files changed +3
-12
lines changed Expand file tree Collapse file tree 2 files changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ import (
5050 cutil "go.podman.io/common/pkg/util"
5151 "go.podman.io/storage"
5252 "go.podman.io/storage/pkg/chrootarchive"
53+ "go.podman.io/storage/pkg/directory"
5354 "go.podman.io/storage/pkg/fileutils"
5455 "go.podman.io/storage/pkg/idmap"
5556 "go.podman.io/storage/pkg/idtools"
@@ -100,8 +101,8 @@ func (c *Container) rootFsSize() (int64, error) {
100101// for a given container.
101102func (c * Container ) rwSize () (int64 , error ) {
102103 if c .config .Rootfs != "" {
103- size , err := util . SizeOfPath (c .config .Rootfs )
104- return int64 ( size ) , err
104+ size , err := directory . Size (c .config .Rootfs )
105+ return size , err
105106 }
106107
107108 layerSize , err := c .runtime .store .ContainerSize (c .ID ())
Original file line number Diff line number Diff line change @@ -25,7 +25,6 @@ import (
2525 "github.com/opencontainers/runtime-spec/specs-go"
2626 "github.com/sirupsen/logrus"
2727 "go.podman.io/image/v5/types"
28- "go.podman.io/storage/pkg/directory"
2928 "go.podman.io/storage/pkg/fileutils"
3029 "go.podman.io/storage/pkg/idtools"
3130 "go.podman.io/storage/pkg/unshare"
@@ -1198,15 +1197,6 @@ func LookupUser(name string) (*user.User, error) {
11981197 return user .Lookup (name )
11991198}
12001199
1201- // SizeOfPath determines the file usage of a given path. it was called volumeSize in v1
1202- // and now is made to be generic and take a path instead of a libpod volume
1203- //
1204- // Deprecated: use github.com/containers/storage/pkg/directory.Size() instead.
1205- func SizeOfPath (path string ) (uint64 , error ) {
1206- size , err := directory .Size (path )
1207- return uint64 (size ), err
1208- }
1209-
12101200// ParseRestartPolicy parses the value given to the --restart flag and returns the policy
12111201// and restart retries value
12121202func ParseRestartPolicy (policy string ) (string , uint , error ) {
You can’t perform that action at this time.
0 commit comments