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
dd7ef76b
Commit
dd7ef76b
authored
May 15, 2024
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fs: avoid using unix.UTIME_OMIT on darwin
Change-Id: I8f05010f64edaf1d41fdfca31ee4ae3079cd0ae3
parent
087d70b7
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
2 deletions
+8
-2
fs/loopback.go
fs/loopback.go
+2
-2
fs/loopback_darwin.go
fs/loopback_darwin.go
+2
-0
fs/loopback_freebsd.go
fs/loopback_freebsd.go
+2
-0
fs/loopback_linux.go
fs/loopback_linux.go
+2
-0
No files found.
fs/loopback.go
View file @
dd7ef76b
...
...
@@ -403,8 +403,8 @@ func (n *LoopbackNode) Setattr(ctx context.Context, f FileHandle, in *fuse.SetAt
atime
,
aok
:=
in
.
GetATime
()
if
mok
||
aok
{
ta
:=
unix
.
Timespec
{
Nsec
:
unix
.
UTIME_OMIT
}
tm
:=
unix
.
Timespec
{
Nsec
:
unix
.
UTIME_OMIT
}
ta
:=
unix
.
Timespec
{
Nsec
:
unix
_
UTIME_OMIT
}
tm
:=
unix
.
Timespec
{
Nsec
:
unix
_
UTIME_OMIT
}
var
err
error
if
aok
{
ta
,
err
=
unix
.
TimeToTimespec
(
atime
)
...
...
fs/loopback_darwin.go
View file @
dd7ef76b
...
...
@@ -12,6 +12,8 @@ import (
"time"
)
const
unix_UTIME_OMIT
=
0x0
// timeToTimeval - Convert time.Time to syscall.Timeval
//
// Note: This does not use syscall.NsecToTimespec because
...
...
fs/loopback_freebsd.go
View file @
dd7ef76b
...
...
@@ -7,6 +7,8 @@ import (
"golang.org/x/sys/unix"
)
const
unix_UTIME_OMIT
=
unix
.
UTIME_OMIT
// FreeBSD has added copy_file_range(2) since FreeBSD 12. However,
// golang.org/x/sys/unix hasn't add corresponding syscall constant or
// wrap function. Here we define the syscall constant until sys/unix
...
...
fs/loopback_linux.go
View file @
dd7ef76b
...
...
@@ -13,6 +13,8 @@ import (
"golang.org/x/sys/unix"
)
const
unix_UTIME_OMIT
=
unix
.
UTIME_OMIT
func
doCopyFileRange
(
fdIn
int
,
offIn
int64
,
fdOut
int
,
offOut
int64
,
len
int
,
flags
int
)
(
uint32
,
syscall
.
Errno
)
{
count
,
err
:=
unix
.
CopyFileRange
(
fdIn
,
&
offIn
,
fdOut
,
&
offOut
,
len
,
flags
)
...
...
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