Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go-fuse
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go-fuse
Commits
336fe3bc
Commit
336fe3bc
authored
Oct 03, 2011
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use exec.LookPath() to find umount/fusermount.
parent
10138a24
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
20 deletions
+5
-20
fuse/mount.go
fuse/mount.go
+5
-20
No files found.
fuse/mount.go
View file @
336fe3bc
...
...
@@ -2,17 +2,16 @@ package fuse
// Written with a look to http://ptspts.blogspot.com/2009/11/fuse-protocol-tutorial-for-linux-26.html
import
(
"exec"
"fmt"
"os"
"path"
"path/filepath"
"strings"
"syscall"
"unsafe"
)
var
fusermountBinary
string
=
"/bin/fusermount"
var
umountBinary
string
=
"/bin/umount"
var
fusermountBinary
string
var
umountBinary
string
func
Socketpair
(
network
string
)
(
l
,
r
*
os
.
File
,
err
os
.
Error
)
{
var
domain
int
...
...
@@ -153,20 +152,6 @@ func getConnection(local *os.File) (f *os.File, err os.Error) {
}
func
init
()
{
for
_
,
v
:=
range
strings
.
Split
(
os
.
Getenv
(
"PATH"
),
":"
)
{
tpath
:=
path
.
Join
(
v
,
"fusermount"
)
fi
,
_
:=
os
.
Stat
(
tpath
)
if
fi
!=
nil
&&
(
fi
.
Mode
&
0111
)
!=
0
{
fusermountBinary
=
tpath
break
}
tpath
=
path
.
Join
(
v
,
"umount"
)
fi
,
_
=
os
.
Stat
(
tpath
)
if
fi
!=
nil
&&
(
fi
.
Mode
&
0111
)
!=
0
{
umountBinary
=
tpath
break
}
}
fusermountBinary
,
_
=
exec
.
LookPath
(
"fusermount"
)
umountBinary
,
_
=
exec
.
LookPath
(
"umount"
)
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment