summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libpod/runtime.go9
-rw-r--r--pkg/systemd/generate/containers.go7
2 files changed, 7 insertions, 9 deletions
diff --git a/libpod/runtime.go b/libpod/runtime.go
index d31d00ae4..30659a3d4 100644
--- a/libpod/runtime.go
+++ b/libpod/runtime.go
@@ -946,9 +946,12 @@ func (r *Runtime) StorageConfig() storage.StoreOptions {
return r.storageConfig
}
-// GetStore returns the runtime stores
-func (r *Runtime) GetStore() storage.Store {
- return r.store
+// RunRoot retrieves the current c/storage temporary directory in use by Libpod.
+func (r *Runtime) RunRoot() string {
+ if r.store == nil {
+ return ""
+ }
+ return r.store.RunRoot()
}
// GetName retrieves the name associated with a given full ID.
diff --git a/pkg/systemd/generate/containers.go b/pkg/systemd/generate/containers.go
index 0e6e1b4df..083520316 100644
--- a/pkg/systemd/generate/containers.go
+++ b/pkg/systemd/generate/containers.go
@@ -160,16 +160,11 @@ func generateContainerInfo(ctr *libpod.Container, options entities.GenerateSyste
nameOrID, serviceName := containerServiceName(ctr, options)
- store := ctr.Runtime().GetStore()
- if store == nil {
- return nil, errors.Errorf("could not determine storage store for container")
- }
-
var runRoot string
if options.New {
runRoot = "%t/containers"
} else {
- runRoot = store.RunRoot()
+ runRoot = ctr.Runtime().RunRoot()
if runRoot == "" {
return nil, errors.Errorf("could not lookup container's runroot: got empty string")
}