summaryrefslogtreecommitdiff
path: root/libpod/container.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-03-05 03:57:17 -0500
committerGitHub <noreply@github.com>2021-03-05 03:57:17 -0500
commit05080a12a998802570ee123a39368a0fe97e2fd2 (patch)
treee2828a62966c6d05e2d79cb7cc90ae3254279657 /libpod/container.go
parent4e5cc6a3a61d9d2f1d3b97fc10684ec5617816ab (diff)
parenta090301bbb10424ce4f99e40c97959f0e8664718 (diff)
downloadpodman-05080a12a998802570ee123a39368a0fe97e2fd2.tar.gz
podman-05080a12a998802570ee123a39368a0fe97e2fd2.tar.bz2
podman-05080a12a998802570ee123a39368a0fe97e2fd2.zip
Merge pull request #9593 from vrothberg/cp-tmp
podman cp: support copying on tmpfs mounts
Diffstat (limited to 'libpod/container.go')
-rw-r--r--libpod/container.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/libpod/container.go b/libpod/container.go
index ee6e243ac..65abbfd5e 100644
--- a/libpod/container.go
+++ b/libpod/container.go
@@ -904,6 +904,12 @@ func (c *Container) NamespacePath(linuxNS LinuxNS) (string, error) { //nolint:in
}
}
+ return c.namespacePath(linuxNS)
+}
+
+// namespacePath returns the path of one of the container's namespaces
+// If the container is not running, an error will be returned
+func (c *Container) namespacePath(linuxNS LinuxNS) (string, error) { //nolint:interfacer
if c.state.State != define.ContainerStateRunning && c.state.State != define.ContainerStatePaused {
return "", errors.Wrapf(define.ErrCtrStopped, "cannot get namespace path unless container %s is running", c.ID())
}