func (m *execMounter) PathIsDevice(pathname string) (bool, error) {
	return m.wrappedMounter.PathIsDevice(pathname)
}
PathIsDevice uses FileInfo returned from os.Stat to check if path refers
to a device.
package mount
import (
	"fmt"
	"os"
	"github.com/golang/glog"
)
type execMounter struct {
	wrappedMounter Interface
	exec           Exec
}
func NewExecMounter(exec Exec, wrapped Interface) Interface {
	return &execMounter{
		wrappedMounter: wrapped,
		exec:           exec,
	}
}
var _ Interface = &execMounter{}
func (m *execMounter) Mount(source string, target string, fstype string, options []string) error {
	bind, bindRemountOpts := isBind(options)
	if bind {
		err := m.doExecMount(source, target, fstype, []string{"bind"})
		if err != nil {
			return err
		}
		return m.doExecMount(source, target, fstype, bindRemountOpts)
	}
	return m.doExecMount(source, target, fstype, options)
}
func (m *execMounter) doExecMount(source, target, fstype string, options []string) error {
	glog.V(5).Infof("Exec Mounting %s %s %s %v", source, target, fstype, options)
	mountArgs := makeMountArgs(source, target, fstype, options)
	output, err := m.exec.Run("mount", mountArgs...)
	glog.V(5).Infof("Exec mounted %v: %v: %s", mountArgs, err, string(output))
	if err != nil {
		return fmt.Errorf("mount failed: %v\nMounting command: %s\nMounting arguments: %s %s %s %v\nOutput: %s\n",
			err, "mount", source, target, fstype, options, string(output))
	}
	return err
}
func (m *execMounter) Unmount(target string) error {
	outputBytes, err := m.exec.Run("umount", target)
	if err == nil {
		glog.V(5).Infof("Exec unmounted %s: %s", target, string(outputBytes))
	} else {
		glog.V(5).Infof("Failed to exec unmount %s: err: %q, umount output: %s", target, err, string(outputBytes))
	}
	return err
}
func (m *execMounter) List() ([]MountPoint, error) {
	return m.wrappedMounter.List()
}
func (m *execMounter) IsLikelyNotMountPoint(file string) (bool, error) {
	return m.wrappedMounter.IsLikelyNotMountPoint(file)
}
func (m *execMounter) DeviceOpened(pathname string) (bool, error) {
	return m.wrappedMounter.DeviceOpened(pathname)
}