Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
ca1bf267
Commit
ca1bf267
authored
10 years ago
by
Juan Batiz-Benet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check osxfuse version. Fixes #202.
parent
b02dbc4a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
cmd/ipfs/mount_unix.go
cmd/ipfs/mount_unix.go
+26
-0
No files found.
cmd/ipfs/mount_unix.go
View file @
ca1bf267
...
...
@@ -4,6 +4,9 @@ package main
import
(
"fmt"
"runtime"
"strings"
"syscall"
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/gonuts/flag"
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/commander"
...
...
@@ -33,6 +36,9 @@ func init() {
}
func
mountCmd
(
c
*
commander
.
Command
,
inp
[]
string
)
error
{
if
err
:=
osxFuseCheck
();
err
!=
nil
{
return
err
}
cc
,
err
:=
setupCmdContext
(
c
,
true
)
if
err
!=
nil
{
...
...
@@ -92,3 +98,23 @@ func mountIpns(node *core.IpfsNode, nsdir, fsdir string) <-chan error {
return
done
}
func
osxFuseCheck
()
error
{
// on OSX, check FUSE version.
if
runtime
.
GOOS
!=
"darwin"
{
return
nil
}
ov
,
err
:=
syscall
.
Sysctl
(
"osxfuse.version.number"
)
if
err
!=
nil
{
return
err
}
if
strings
.
HasPrefix
(
ov
,
"2.7."
)
||
strings
.
HasPrefix
(
ov
,
"2.8."
)
{
return
nil
}
return
fmt
.
Errorf
(
"osxfuse version %s not supported.
\n
%s
\n
%s"
,
ov
,
"Older versions of osxfuse have kernel panic bugs; please upgrade!"
,
"https://github.com/jbenet/go-ipfs/issues/177"
)
}
This diff is collapsed.
Click to expand it.
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