devmapper.Mounted: remove
It looks like no one uses this function.
@@ -6,30 +6,8 @@ import (
"bytes"
"fmt"
"os"
- "path/filepath"
-
- "golang.org/x/sys/unix"
)
-// FIXME: this is copy-pasted from the aufs driver.
-// It should be moved into the core.
-
-// Mounted returns true if a mount point exists.
-func Mounted(mountpoint string) (bool, error) {
- var mntpointSt unix.Stat_t
- if err := unix.Stat(mountpoint, &mntpointSt); err != nil {
- if os.IsNotExist(err) {
- return false, nil
- }
- return false, err
- }
- var parentSt unix.Stat_t
- if err := unix.Stat(filepath.Join(mountpoint, ".."), &parentSt); err != nil {
- return false, err
- }
- return mntpointSt.Dev != parentSt.Dev, nil
-}
-
type probeData struct {
fsName string
magic string
