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
90eabd70
Commit
90eabd70
authored
Apr 07, 2024
by
lch
Committed by
Han-Wen Nienhuys
Apr 12, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fs: separate integer conversion for different os
Change-Id: I8ff8e8dc9431b5af52e3ca8e78f0da73cead9008
parent
6e330dd3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
1 deletion
+9
-1
fs/loopback.go
fs/loopback.go
+1
-1
fs/loopback_darwin.go
fs/loopback_darwin.go
+4
-0
fs/loopback_linux.go
fs/loopback_linux.go
+4
-0
No files found.
fs/loopback.go
View file @
90eabd70
...
...
@@ -123,7 +123,7 @@ var _ = (NodeMknoder)((*LoopbackNode)(nil))
func
(
n
*
LoopbackNode
)
Mknod
(
ctx
context
.
Context
,
name
string
,
mode
,
rdev
uint32
,
out
*
fuse
.
EntryOut
)
(
*
Inode
,
syscall
.
Errno
)
{
p
:=
filepath
.
Join
(
n
.
path
(),
name
)
err
:=
syscall
.
Mknod
(
p
,
mode
,
int
(
rdev
))
err
:=
syscall
.
Mknod
(
p
,
mode
,
int
Dev
(
rdev
))
if
err
!=
nil
{
return
nil
,
ToErrno
(
err
)
}
...
...
fs/loopback_darwin.go
View file @
90eabd70
...
...
@@ -123,3 +123,7 @@ func (n *LoopbackNode) CopyFileRange(ctx context.Context, fhIn FileHandle,
len
uint64
,
flags
uint64
)
(
uint32
,
syscall
.
Errno
)
{
return
0
,
syscall
.
ENOSYS
}
func
intDev
(
dev
uint32
)
int
{
return
int
(
dev
)
}
fs/loopback_linux.go
View file @
90eabd70
...
...
@@ -61,3 +61,7 @@ func (n *LoopbackNode) CopyFileRange(ctx context.Context, fhIn FileHandle,
count
,
err
:=
unix
.
CopyFileRange
(
lfIn
.
fd
,
&
signedOffIn
,
lfOut
.
fd
,
&
signedOffOut
,
int
(
len
),
int
(
flags
))
return
uint32
(
count
),
ToErrno
(
err
)
}
func
intDev
(
dev
uint32
)
int
{
return
int
(
dev
)
}
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