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
905b26f1
Commit
905b26f1
authored
Apr 07, 2024
by
lch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
internal: add renameat syscall on FreeBSD
Change-Id: I694fa828c6f71941412afbb46535eb40dbecb4b2
parent
2901efa0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
internal/renameat/renameat.go
internal/renameat/renameat.go
+1
-0
internal/renameat/renameat_freebsd.go
internal/renameat/renameat_freebsd.go
+17
-0
No files found.
internal/renameat/renameat.go
View file @
905b26f1
...
...
@@ -3,6 +3,7 @@ package renameat
// Renameat is a wrapper around renameat syscall.
// On Linux, it is a wrapper around renameat2(2).
// On Darwin, it is a wrapper around renameatx_np(2).
// On FreeBSD, it is a wrapper around renameat(2).
func
Renameat
(
olddirfd
int
,
oldpath
string
,
newdirfd
int
,
newpath
string
,
flags
uint
)
(
err
error
)
{
return
renameat
(
olddirfd
,
oldpath
,
newdirfd
,
newpath
,
flags
)
}
internal/renameat/renameat_freebsd.go
0 → 100644
View file @
905b26f1
package
renameat
import
"golang.org/x/sys/unix"
const
(
// Since FreeBSD does not currently privode renameat syscall
// beyond POSIX standard like Linux and Darwin do, we borrow
// the defination from Linux but reject these non-POSIX flags.
RENAME_EXCHANGE
=
(
1
<<
1
)
)
func
renameat
(
olddirfd
int
,
oldpath
string
,
newdirfd
int
,
newpath
string
,
flags
uint
)
(
err
error
)
{
if
flags
!=
0
{
return
unix
.
ENOSYS
}
return
unix
.
Renameat
(
olddirfd
,
oldpath
,
newdirfd
,
newpath
)
}
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