aboutsummaryrefslogtreecommitdiff
path: root/libpod/options.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2017-11-07 13:46:30 -0500
committerMatthew Heon <matthew.heon@gmail.com>2017-11-18 12:54:05 -0500
commitc6fe4430b76ceeecd6b0b609cca8e705921db0c4 (patch)
tree2b2b85f120001df77ee5133dc8c4ae3655519324 /libpod/options.go
parent3b72af614777b966671ad0eb0c5dbde0eeedcfa2 (diff)
downloadpodman-c6fe4430b76ceeecd6b0b609cca8e705921db0c4.tar.gz
podman-c6fe4430b76ceeecd6b0b609cca8e705921db0c4.tar.bz2
podman-c6fe4430b76ceeecd6b0b609cca8e705921db0c4.zip
Compile-tested implementation of SQL-backed state
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
Diffstat (limited to 'libpod/options.go')
-rw-r--r--libpod/options.go22
1 files changed, 1 insertions, 21 deletions
diff --git a/libpod/options.go b/libpod/options.go
index 10cb605c2..fb64c0c41 100644
--- a/libpod/options.go
+++ b/libpod/options.go
@@ -236,25 +236,6 @@ func WithNoPivotRoot(noPivot bool) RuntimeOption {
// Container Creation Options
-// WithRootFSFromPath uses the given path as a container's root filesystem
-// No further setup is performed on this path
-func WithRootFSFromPath(path string) CtrCreateOption {
- return func(ctr *Container) error {
- if ctr.valid {
- return ErrCtrFinalized
- }
-
- if ctr.config.RootfsDir != "" || ctr.config.RootfsImageID != "" || ctr.config.RootfsImageName != "" {
- return errors.Wrapf(ErrInvalidArg, "container already configured with root filesystem")
- }
-
- ctr.config.RootfsDir = path
- ctr.config.RootfsFromImage = false
-
- return nil
- }
-}
-
// WithSELinuxMountLabel sets the mount label for SELinux
func WithSELinuxMountLabel(mountLabel string) CtrCreateOption {
return func(ctr *Container) error {
@@ -277,14 +258,13 @@ func WithRootFSFromImage(imageID string, imageName string, useImageConfig bool)
return ErrCtrFinalized
}
- if ctr.config.RootfsDir != "" || ctr.config.RootfsImageID != "" || ctr.config.RootfsImageName != "" {
+ if ctr.config.RootfsImageID != "" || ctr.config.RootfsImageName != "" {
return errors.Wrapf(ErrInvalidArg, "container already configured with root filesystem")
}
ctr.config.RootfsImageID = imageID
ctr.config.RootfsImageName = imageName
ctr.config.UseImageConfig = useImageConfig
- ctr.config.RootfsFromImage = true
return nil
}