Browse code

devmapper.Mounted: remove

It looks like no one uses this function.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>

Kir Kolyshkin authored on 2018/02/28 10:41:48
Showing 1 changed files
... ...
@@ -6,30 +6,8 @@ import (
6 6
 	"bytes"
7 7
 	"fmt"
8 8
 	"os"
9
-	"path/filepath"
10
-
11
-	"golang.org/x/sys/unix"
12 9
 )
13 10
 
14
-// FIXME: this is copy-pasted from the aufs driver.
15
-// It should be moved into the core.
16
-
17
-// Mounted returns true if a mount point exists.
18
-func Mounted(mountpoint string) (bool, error) {
19
-	var mntpointSt unix.Stat_t
20
-	if err := unix.Stat(mountpoint, &mntpointSt); err != nil {
21
-		if os.IsNotExist(err) {
22
-			return false, nil
23
-		}
24
-		return false, err
25
-	}
26
-	var parentSt unix.Stat_t
27
-	if err := unix.Stat(filepath.Join(mountpoint, ".."), &parentSt); err != nil {
28
-		return false, err
29
-	}
30
-	return mntpointSt.Dev != parentSt.Dev, nil
31
-}
32
-
33 11
 type probeData struct {
34 12
 	fsName string
35 13
 	magic  string