swarm/api: support mounting manifests via FUSE (#3690)

This commit is contained in:
Zahoor Mohamed
2017-03-23 19:26:06 +05:30
committed by Felix Lange
parent 61d2150a07
commit 11e7a712f4
44 changed files with 7005 additions and 3 deletions

21
vendor/bazil.org/fuse/unmount_linux.go generated vendored Normal file
View File

@ -0,0 +1,21 @@
package fuse
import (
"bytes"
"errors"
"os/exec"
)
func unmount(dir string) error {
cmd := exec.Command("fusermount", "-u", dir)
output, err := cmd.CombinedOutput()
if err != nil {
if len(output) > 0 {
output = bytes.TrimRight(output, "\n")
msg := err.Error() + ": " + string(output)
err = errors.New(msg)
}
return err
}
return nil
}