Commit 34f664cc authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Rename getFuseConn to getConnection.

parent fbe06b9f
...@@ -68,7 +68,7 @@ func mount(mountPoint string) (f *os.File, finalMountPoint string, err os.Error) ...@@ -68,7 +68,7 @@ func mount(mountPoint string) (f *os.File, finalMountPoint string, err os.Error)
return return
} }
f, err = getFuseConn(local) f, err = getConnection(local)
finalMountPoint = mountPoint finalMountPoint = mountPoint
return return
} }
...@@ -91,7 +91,7 @@ func unmount(mountPoint string) (err os.Error) { ...@@ -91,7 +91,7 @@ func unmount(mountPoint string) (err os.Error) {
return return
} }
func getFuseConn(local *os.File) (f *os.File, err os.Error) { func getConnection(local *os.File) (f *os.File, err os.Error) {
var data [4]byte var data [4]byte
control := make([]byte, 4*256) control := make([]byte, 4*256)
...@@ -107,15 +107,15 @@ func getFuseConn(local *os.File) (f *os.File, err os.Error) { ...@@ -107,15 +107,15 @@ func getFuseConn(local *os.File) (f *os.File, err os.Error) {
fd := *(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&control[0])) + syscall.SizeofCmsghdr)) fd := *(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&control[0])) + syscall.SizeofCmsghdr))
if message.Type != 1 { if message.Type != 1 {
err = os.NewError(fmt.Sprintf("getFuseConn: recvmsg returned wrong control type: %d", message.Type)) err = os.NewError(fmt.Sprintf("getConnection: recvmsg returned wrong control type: %d", message.Type))
return return
} }
if oobn <= syscall.SizeofCmsghdr { if oobn <= syscall.SizeofCmsghdr {
err = os.NewError(fmt.Sprintf("getFuseConn: too short control message. Length: %d", oobn)) err = os.NewError(fmt.Sprintf("getConnection: too short control message. Length: %d", oobn))
return return
} }
if fd < 0 { if fd < 0 {
err = os.NewError(fmt.Sprintf("getFuseConn: fd < 0: %d", fd)) err = os.NewError(fmt.Sprintf("getConnection: fd < 0: %d", fd))
return return
} }
f = os.NewFile(int(fd), "<fuseConnection>") f = os.NewFile(int(fd), "<fuseConnection>")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment