@@ -11,7 +11,6 @@ import (
1111 "os/exec"
1212 "strings"
1313 "syscall"
14- "unsafe"
1514)
1615
1716func unixgramSocketpair () (l , r * os.File , err error ) {
@@ -90,33 +89,6 @@ func unmount(dir string, opts *MountOptions) error {
9089 return syscall .Unmount (dir , 0 )
9190}
9291
93- func getConnection (local * os.File ) (int , error ) {
94- var data [4 ]byte
95- control := make ([]byte , 4 * 256 )
96-
97- // n, oobn, recvflags, from, errno - todo: error checking.
98- _ , oobn , _ , _ ,
99- err := syscall .Recvmsg (
100- int (local .Fd ()), data [:], control [:], 0 )
101- if err != nil {
102- return 0 , err
103- }
104-
105- message := * (* syscall .Cmsghdr )(unsafe .Pointer (& control [0 ]))
106- fd := * (* int32 )(unsafe .Pointer (uintptr (unsafe .Pointer (& control [0 ])) + syscall .SizeofCmsghdr ))
107-
108- if message .Type != syscall .SCM_RIGHTS {
109- return 0 , fmt .Errorf ("getConnection: recvmsg returned wrong control type: %d" , message .Type )
110- }
111- if oobn <= syscall .SizeofCmsghdr {
112- return 0 , fmt .Errorf ("getConnection: too short control message. Length: %d" , oobn )
113- }
114- if fd < 0 {
115- return 0 , fmt .Errorf ("getConnection: fd < 0: %d" , fd )
116- }
117- return int (fd ), nil
118- }
119-
12092func fusermountBinary () (string , error ) {
12193 binPaths := []string {
12294 "/Library/Filesystems/macfuse.fs/Contents/Resources/mount_macfuse" ,
0 commit comments