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
05743967
Commit
05743967
authored
Feb 22, 2019
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nodefs: futimens() on loopbackfile.
parent
ebdf939a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
3 deletions
+21
-3
nodefs/files_linux.go
nodefs/files_linux.go
+1
-3
nodefs/syscall_linux.go
nodefs/syscall_linux.go
+20
-0
No files found.
nodefs/files_linux.go
View file @
05743967
...
...
@@ -28,9 +28,7 @@ func (f *loopbackFile) Utimens(ctx context.Context, a *time.Time, m *time.Time)
ts
[
0
]
=
fuse
.
UtimeToTimespec
(
a
)
ts
[
1
]
=
fuse
.
UtimeToTimespec
(
m
)
f
.
mu
.
Lock
()
var
err
error
// NOSUBMIT
// err := futimens(int(f.File.Fd()), &ts)
err
:=
futimens
(
int
(
f
.
File
.
Fd
()),
&
ts
)
f
.
mu
.
Unlock
()
return
fuse
.
ToStatus
(
err
)
}
nodefs/syscall_linux.go
0 → 100644
View file @
05743967
// Copyright 2016 the Go-FUSE Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package
nodefs
import
(
"syscall"
"unsafe"
)
// futimens - futimens(3) calls utimensat(2) with "pathname" set to null and
// "flags" set to zero
func
futimens
(
fd
int
,
times
*
[
2
]
syscall
.
Timespec
)
(
err
error
)
{
_
,
_
,
e1
:=
syscall
.
Syscall6
(
syscall
.
SYS_UTIMENSAT
,
uintptr
(
fd
),
0
,
uintptr
(
unsafe
.
Pointer
(
times
)),
uintptr
(
0
),
0
,
0
)
if
e1
!=
0
{
err
=
syscall
.
Errno
(
e1
)
}
return
}
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