From e5fcffc551b42936c635d13658e7d0a9e95d3a16 Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Thu, 8 Jul 2021 14:22:33 -0400 Subject: Remove GetStore function from Libpod We should not be exposing the store outside of Libpod. We want to encapsulate it as an internal implementation detail - there's no reason functions outside of Libpod should directly be manipulating container storage. Convert the last use to invoke a method on Libpod instead, and remove the function. [NO TESTS NEEDED] as this is just a refactor. Signed-off-by: Matthew Heon --- pkg/systemd/generate/containers.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'pkg/systemd') 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") } -- cgit v1.2.3-54-g00ecf