summaryrefslogtreecommitdiff
path: root/cmd/podman/mount.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2019-03-25 15:43:38 -0400
committerMatthew Heon <matthew.heon@pm.me>2019-03-27 20:00:31 -0400
commit5ed62991dcbe85e28774b036a7c89033af80136f (patch)
treeea5b57abb6290bf0afac083292aad6dc653f52be /cmd/podman/mount.go
parent340eeec1b654880f9d339c9ac2957bcaeaee6829 (diff)
downloadpodman-5ed62991dcbe85e28774b036a7c89033af80136f.tar.gz
podman-5ed62991dcbe85e28774b036a7c89033af80136f.tar.bz2
podman-5ed62991dcbe85e28774b036a7c89033af80136f.zip
Remove ulele/deepcopier in favor of JSON deep copy
We have a very high performance JSON library that doesn't need to perform code generation. Let's use it instead of our questionably performant, reflection-dependent deep copy library. Most changes because some functions can now return errors. Also converts cmd/podman to use jsoniter, instead of pkg/json, for increased performance. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'cmd/podman/mount.go')
-rw-r--r--cmd/podman/mount.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmd/podman/mount.go b/cmd/podman/mount.go
index d074551ce..138548097 100644
--- a/cmd/podman/mount.go
+++ b/cmd/podman/mount.go
@@ -71,7 +71,11 @@ func mountCmd(c *cliconfig.MountValues) error {
defer runtime.Shutdown(false)
if os.Geteuid() != 0 {
- if driver := runtime.GetConfig().StorageConfig.GraphDriverName; driver != "vfs" {
+ rtc, err := runtime.GetConfig()
+ if err != nil {
+ return err
+ }
+ if driver := rtc.StorageConfig.GraphDriverName; driver != "vfs" {
// Do not allow to mount a graphdriver that is not vfs if we are creating the userns as part
// of the mount command.
return fmt.Errorf("cannot mount using driver %s in rootless mode", driver)