mirror of
https://github.com/containers/podman.git
synced 2026-10-20 08:55:09 -04:00
libpod: Implement 'podman cp' for FreeBSD
[NO NEW TESTS NEEDED] Signed-off-by: Doug Rabson <dfr@rabson.org>
This commit is contained in:
1 parent
88f82ceab2
commit
bb160be12b
6 files changed
+34
-8
No files matched your search
@@ -1,5 +1,5 @@
|
||||
//go:build linux
|
||||
// +build linux
|
||||
//go:build linux || freebsd
|
||||
// +build linux freebsd
|
||||
|
||||
package libpod
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package libpod
|
||||
|
||||
// On FreeBSD, the container's mounts are in the global mount
|
||||
// namespace so we can just execute the function directly.
|
||||
func (c *Container) joinMountAndExec(f func() error) error {
|
||||
return f()
|
||||
}
|
||||
|
||||
// Similarly, we can just use resolvePath for both running and stopped
|
||||
// containers.
|
||||
func (c *Container) resolveCopyTarget(mountPoint string, containerPath string) (string, string, error) {
|
||||
return c.resolvePath(mountPoint, containerPath)
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
//go:build !linux
|
||||
// +build !linux
|
||||
//go:build !linux && !freebsd
|
||||
// +build !linux,!freebsd
|
||||
|
||||
package libpod
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//go:build linux
|
||||
// +build linux
|
||||
//go:build linux || freebsd
|
||||
// +build linux freebsd
|
||||
|
||||
package libpod
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package libpod
|
||||
|
||||
import (
|
||||
"github.com/containers/buildah/copier"
|
||||
)
|
||||
|
||||
// On FreeBSD, jails use the global mount namespace, filtered to only
|
||||
// the mounts the jail should see. This means that we can use
|
||||
// statOnHost whether the container is running or not.
|
||||
// container is running
|
||||
func (c *Container) statInContainer(mountPoint string, containerPath string) (*copier.StatForItem, string, string, error) {
|
||||
return c.statOnHost(mountPoint, containerPath)
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
//go:build !linux
|
||||
// +build !linux
|
||||
//go:build !linux && !freebsd
|
||||
// +build !linux,!freebsd
|
||||
|
||||
package libpod
|
||||
|
||||
|
||||
Reference in new issue
Block a user