summaryrefslogtreecommitdiff
path: root/libpod/boltdb_state_unsupported.go
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2018-07-25 04:19:58 +0200
committerAtomic Bot <atomic-devel@projectatomic.io>2018-07-26 20:47:31 +0000
commiteba6bf0018157e9594f43f1d2baeee3f56eb9cef (patch)
treea8951ecaf437b3dc6099d96d5419774cbcf66ecc /libpod/boltdb_state_unsupported.go
parent24fe6e950c5c384a052b320b3473b1fa70c088f9 (diff)
downloadpodman-eba6bf0018157e9594f43f1d2baeee3f56eb9cef.tar.gz
podman-eba6bf0018157e9594f43f1d2baeee3f56eb9cef.tar.bz2
podman-eba6bf0018157e9594f43f1d2baeee3f56eb9cef.zip
Split parseNetNSBoltData from BoltState.getContainerFromDB
This is the actual platform-specific part of getContainerFromDB. Factor it out, unchanged, on Linux. On other platforms, introduce a stub which fails if any data exists; this stub is not yet called. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com> Closes: #1115 Approved by: rhatdan
Diffstat (limited to 'libpod/boltdb_state_unsupported.go')
-rw-r--r--libpod/boltdb_state_unsupported.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/libpod/boltdb_state_unsupported.go b/libpod/boltdb_state_unsupported.go
index 8d3749881..f6faaa378 100644
--- a/libpod/boltdb_state_unsupported.go
+++ b/libpod/boltdb_state_unsupported.go
@@ -4,8 +4,19 @@ package libpod
import (
"github.com/boltdb/bolt"
+ "github.com/sirupsen/logrus"
)
+// parseNetNSBoltData sets ctr.state.NetNS, if any, from netNSBytes.
+// Returns true if the data is valid.
+func parseNetNSBoltData(ctr *Container, netNSBytes []byte) bool {
+ if netNSBytes != nil {
+ logrus.Errorf("error loading %s: network namespaces are not supported on this platform", ctr.ID())
+ return false
+ }
+ return true
+}
+
func (s *BoltState) getContainerFromDB(id []byte, ctr *Container, ctrsBkt *bolt.Bucket) error {
return ErrNotImplemented
}