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
58aa3140
Commit
58aa3140
authored
Apr 03, 2019
by
Grant Monroe
Committed by
Han-Wen Nienhuys
Apr 03, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nodefs: fix builds on darwin
parent
0a5037fa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
6 deletions
+16
-6
nodefs/loopback_darwin.go
nodefs/loopback_darwin.go
+14
-6
nodefs/loopback_linux.go
nodefs/loopback_linux.go
+2
-0
No files found.
nodefs/loopback_darwin.go
View file @
58aa3140
// +build darwin
// Copyright 2019 the Go-FUSE Authors. All rights reserved.
// Copyright 2019 the Go-FUSE Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// license that can be found in the LICENSE file.
...
@@ -14,19 +16,19 @@ import (
...
@@ -14,19 +16,19 @@ import (
"github.com/hanwen/go-fuse/internal/utimens"
"github.com/hanwen/go-fuse/internal/utimens"
)
)
func
(
n
*
loopbackNode
)
Get
XA
ttr
(
ctx
context
.
Context
,
attr
string
,
dest
[]
byte
)
(
uint32
,
syscall
.
Errno
)
{
func
(
n
*
loopbackNode
)
Get
xa
ttr
(
ctx
context
.
Context
,
attr
string
,
dest
[]
byte
)
(
uint32
,
syscall
.
Errno
)
{
return
0
,
syscall
.
ENOSYS
return
0
,
syscall
.
ENOSYS
}
}
func
(
n
*
loopbackNode
)
Set
XA
ttr
(
ctx
context
.
Context
,
attr
string
,
data
[]
byte
,
flags
uint32
)
syscall
.
Errno
{
func
(
n
*
loopbackNode
)
Set
xa
ttr
(
ctx
context
.
Context
,
attr
string
,
data
[]
byte
,
flags
uint32
)
syscall
.
Errno
{
return
syscall
.
ENOSYS
return
syscall
.
ENOSYS
}
}
func
(
n
*
loopbackNode
)
Remove
XA
ttr
(
ctx
context
.
Context
,
attr
string
)
syscall
.
Errno
{
func
(
n
*
loopbackNode
)
Remove
xa
ttr
(
ctx
context
.
Context
,
attr
string
)
syscall
.
Errno
{
return
syscall
.
ENOSYS
return
syscall
.
ENOSYS
}
}
func
(
n
*
loopbackNode
)
List
XA
ttr
(
ctx
context
.
Context
,
dest
[]
byte
)
(
uint32
,
syscall
.
Errno
)
{
func
(
n
*
loopbackNode
)
List
xa
ttr
(
ctx
context
.
Context
,
dest
[]
byte
)
(
uint32
,
syscall
.
Errno
)
{
return
0
,
syscall
.
ENOSYS
return
0
,
syscall
.
ENOSYS
}
}
...
@@ -95,11 +97,11 @@ func timeToTimeval(t *time.Time) syscall.Timeval {
...
@@ -95,11 +97,11 @@ func timeToTimeval(t *time.Time) syscall.Timeval {
}
}
// MacOS before High Sierra lacks utimensat() and UTIME_OMIT.
// MacOS before High Sierra lacks utimensat() and UTIME_OMIT.
// We emulate using utimes() and extra Get
A
ttr() calls.
// We emulate using utimes() and extra Get
a
ttr() calls.
func
(
f
*
loopbackFile
)
utimens
(
a
*
time
.
Time
,
m
*
time
.
Time
)
syscall
.
Errno
{
func
(
f
*
loopbackFile
)
utimens
(
a
*
time
.
Time
,
m
*
time
.
Time
)
syscall
.
Errno
{
var
attr
fuse
.
AttrOut
var
attr
fuse
.
AttrOut
if
a
==
nil
||
m
==
nil
{
if
a
==
nil
||
m
==
nil
{
errno
:=
f
.
Get
A
ttr
(
context
.
Background
(),
&
attr
)
errno
:=
f
.
Get
a
ttr
(
context
.
Background
(),
&
attr
)
if
errno
!=
0
{
if
errno
!=
0
{
return
errno
return
errno
}
}
...
@@ -108,3 +110,9 @@ func (f *loopbackFile) utimens(a *time.Time, m *time.Time) syscall.Errno {
...
@@ -108,3 +110,9 @@ func (f *loopbackFile) utimens(a *time.Time, m *time.Time) syscall.Errno {
err
:=
syscall
.
Futimes
(
int
(
f
.
fd
),
tv
)
err
:=
syscall
.
Futimes
(
int
(
f
.
fd
),
tv
)
return
ToErrno
(
err
)
return
ToErrno
(
err
)
}
}
func
(
n
*
loopbackNode
)
CopyFileRange
(
ctx
context
.
Context
,
fhIn
FileHandle
,
offIn
uint64
,
out
*
Inode
,
fhOut
FileHandle
,
offOut
uint64
,
len
uint64
,
flags
uint64
)
(
uint32
,
syscall
.
Errno
)
{
return
0
,
syscall
.
ENOSYS
}
nodefs/loopback_linux.go
View file @
58aa3140
// +build linux
// Copyright 2019 the Go-FUSE Authors. All rights reserved.
// Copyright 2019 the Go-FUSE Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// license that can be found in the LICENSE file.
...
...
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