summaryrefslogtreecommitdiff
path: root/pkg/specgen/specgen.go
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2020-04-24 11:41:37 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2020-04-24 12:56:20 +0200
commita3acc4f97775a446f93deeb924ab99b708bcfe88 (patch)
treefd10fd2f5b3be1931074c2b22858479d8035c567 /pkg/specgen/specgen.go
parent23d431f0bf4ef4e550d23b43264c2ffdc940c767 (diff)
downloadpodman-a3acc4f97775a446f93deeb924ab99b708bcfe88.tar.gz
podman-a3acc4f97775a446f93deeb924ab99b708bcfe88.tar.bz2
podman-a3acc4f97775a446f93deeb924ab99b708bcfe88.zip
podman: add support for --rootfs
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'pkg/specgen/specgen.go')
-rw-r--r--pkg/specgen/specgen.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/pkg/specgen/specgen.go b/pkg/specgen/specgen.go
index 37f2b3190..275af1f49 100644
--- a/pkg/specgen/specgen.go
+++ b/pkg/specgen/specgen.go
@@ -402,8 +402,13 @@ type NamedVolume struct {
}
// NewSpecGenerator returns a SpecGenerator struct given one of two mandatory inputs
-func NewSpecGenerator(image string) *SpecGenerator {
- csc := ContainerStorageConfig{Image: image}
+func NewSpecGenerator(arg string, rootfs bool) *SpecGenerator {
+ csc := ContainerStorageConfig{}
+ if rootfs {
+ csc.Rootfs = arg
+ } else {
+ csc.Image = arg
+ }
return &SpecGenerator{
ContainerStorageConfig: csc,
}