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
Levin Zimmermann
go-fuse
Commits
7730a211
Commit
7730a211
authored
Sep 20, 2013
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fuse: compile on Darwin.
parent
49c96946
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
21 additions
and
9 deletions
+21
-9
fuse/mount_darwin.go
fuse/mount_darwin.go
+2
-2
fuse/pathfs/loopback_darwin.go
fuse/pathfs/loopback_darwin.go
+5
-3
fuse/pathfs/syscall_linux.go
fuse/pathfs/syscall_linux.go
+9
-0
fuse/pathfs/xattr_test.go
fuse/pathfs/xattr_test.go
+2
-2
fuse/server_darwin.go
fuse/server_darwin.go
+1
-1
fuse/splice_darwin.go
fuse/splice_darwin.go
+1
-1
fuse/types_darwin.go
fuse/types_darwin.go
+1
-0
No files found.
fuse/mount_darwin.go
View file @
7730a211
...
...
@@ -121,9 +121,9 @@ func mount(dir string, options string) (int, error) {
defer
C
.
free
(
unsafe
.
Pointer
(
cdir
))
fd
:=
C
.
mountfuse
(
cdir
,
errp
)
if
*
errp
!=
nil
{
return
nil
,
mountError
(
C
.
GoString
(
*
errp
))
return
-
1
,
mountError
(
C
.
GoString
(
*
errp
))
}
return
fd
,
nil
return
int
(
fd
)
,
nil
}
type
mountError
string
...
...
fuse/pathfs/loopback_darwin.go
View file @
7730a211
package
fuse
package
pathfs
import
(
"syscall"
"github.com/hanwen/go-fuse/fuse"
)
func
(
fs
*
LoopbackFileSystem
)
StatFs
(
name
string
)
*
StatfsOut
{
func
(
fs
*
loopbackFileSystem
)
StatFs
(
name
string
)
*
fuse
.
StatfsOut
{
s
:=
syscall
.
Statfs_t
{}
err
:=
syscall
.
Statfs
(
fs
.
GetPath
(
name
),
&
s
)
if
err
==
nil
{
return
&
StatfsOut
{
return
&
fuse
.
StatfsOut
{
Blocks
:
s
.
Blocks
,
Bsize
:
uint32
(
s
.
Bsize
),
Bfree
:
s
.
Bfree
,
...
...
fuse/pathfs/syscall_linux.go
View file @
7730a211
...
...
@@ -108,3 +108,12 @@ func sysListxattr(path string, dest []byte) (sz int, err error) {
}
return
}
func
sysSetxattr
(
path
string
,
attr
string
,
val
,
flag
)
error
{
return
syscall
.
Setxattr
(
path
,
attr
,
val
,
flag
)
}
func
sysRemovexattr
(
path
string
,
attr
string
)
error
{
return
syscall
.
Removexattr
(
path
,
attr
)
}
fuse/pathfs/xattr_test.go
View file @
7730a211
...
...
@@ -172,7 +172,7 @@ func TestXAttrRead(t *testing.T) {
}
}
err
=
sys
call
.
Setxattr
(
mounted
,
"third"
,
[]
byte
(
"value"
),
0
)
err
=
sysSetxattr
(
mounted
,
"third"
,
[]
byte
(
"value"
),
0
)
if
err
!=
nil
{
t
.
Error
(
"Setxattr error"
,
err
)
}
...
...
@@ -181,7 +181,7 @@ func TestXAttrRead(t *testing.T) {
t
.
Error
(
"Read back set xattr:"
,
err
,
string
(
val
))
}
sys
call
.
Removexattr
(
mounted
,
"third"
)
sysRemovexattr
(
mounted
,
"third"
)
val
,
err
=
readXAttr
(
mounted
,
"third"
)
if
err
!=
syscall
.
ENODATA
{
t
.
Error
(
"Data not removed?"
,
err
,
val
)
...
...
fuse/server_darwin.go
View file @
7730a211
...
...
@@ -6,7 +6,7 @@ import (
func
(
ms
*
Server
)
systemWrite
(
req
*
request
,
header
[]
byte
)
Status
{
if
req
.
flatDataSize
()
==
0
{
_
,
err
:=
syscall
.
Write
(
ms
.
mountFd
,
Write
(
header
)
)
_
,
err
:=
syscall
.
Write
(
ms
.
mountFd
,
header
)
return
ToStatus
(
err
)
}
...
...
fuse/splice_darwin.go
View file @
7730a211
...
...
@@ -8,6 +8,6 @@ func (s *Server) setSplice() {
panic
(
"darwin has no splice."
)
}
func
(
ms
*
Server
)
trySplice
(
header
[]
byte
,
req
*
request
,
fdData
*
R
eadResultFd
)
error
{
func
(
ms
*
Server
)
trySplice
(
header
[]
byte
,
req
*
request
,
fdData
*
r
eadResultFd
)
error
{
return
fmt
.
Errorf
(
"unimplemented"
)
}
fuse/types_darwin.go
View file @
7730a211
...
...
@@ -51,6 +51,7 @@ const (
)
type
GetAttrIn
struct
{
InHeader
}
func
(
g
*
GetAttrIn
)
Flags
()
uint32
{
...
...
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