func (*NsenterMounter) List() ([]MountPoint, error) {
	return listProcMounts(hostProcMountsPath)
}
List returns a list of all mounted filesystems in the host's mount namespace.
package mount
import (
	"fmt"
	"os"
	"path/filepath"
	"regexp"
	"strconv"
	"strings"
	"github.com/golang/glog"
	utilio "k8s.io/kubernetes/pkg/util/io"
	"k8s.io/kubernetes/pkg/util/nsenter"
)
const (
	hostProcMountsPath = "/rootfs/proc/1/mounts"
	hostProcMountinfoPath = "/rootfs/proc/1/mountinfo"
	hostProcSelfStatusPath = "/rootfs/proc/self/status"
)
var (
	pidRegExp = regexp.MustCompile(`\nPid:\t([0-9]*)\n`)
)
type NsenterMounter struct {
	ne *nsenter.Nsenter
}
func NewNsenterMounter() *NsenterMounter {
	return &NsenterMounter{ne: nsenter.NewNsenter()}
}
var _ = Interface(&NsenterMounter{})
func (n *NsenterMounter) Mount(source string, target string, fstype string, options []string) error {
	bind, bindRemountOpts := isBind(options)
	if bind {
		err := n.doNsenterMount(source, target, fstype, []string{"bind"})
		if err != nil {
			return err
		}
		return n.doNsenterMount(source, target, fstype, bindRemountOpts)
	}
	return n.doNsenterMount(source, target, fstype, options)
}
func (n *NsenterMounter) doNsenterMount(source, target, fstype string, options []string) error {
	glog.V(5).Infof("nsenter mount %s %s %s %v", source, target, fstype, options)
	cmd, args := n.makeNsenterArgs(source, target, fstype, options)
	outputBytes, err := n.ne.Exec(cmd, args).CombinedOutput()
	if len(outputBytes) != 0 {
		glog.V(5).Infof("Output of mounting %s to %s: %v", source, target, string(outputBytes))
	}
	return err
}
func (n *NsenterMounter) makeNsenterArgs(source, target, fstype string, options []string) (string, []string) {
	mountCmd := n.ne.AbsHostPath("mount")
	mountArgs := makeMountArgs(source, target, fstype, options)
	if systemdRunPath, hasSystemd := n.ne.SupportsSystemd(); hasSystemd {
		mountCmd, mountArgs = addSystemdScope(systemdRunPath, target, mountCmd, mountArgs)
	} else {
	}
	return mountCmd, mountArgs
}
func (n *NsenterMounter) Unmount(target string) error {
	args := []string{target}
	glog.V(5).Infof("nsenter unmount args: %v", args)
	outputBytes, err := n.ne.Exec("umount", args).CombinedOutput()
	if len(outputBytes) != 0 {
		glog.V(5).Infof("Output of unmounting %s: %v", target, string(outputBytes))
	}
	return err
}