Skip to content

Commit f2bed8f

Browse files
committed
Use CopyFileRange from golang.org/x/sys/unix
Use the CopyFileRange and Lsetxattr from golang.org/x/sys/unix instead of their counterparts from github.com/containerd/continuity/sysx. These are 1:1 replacements (except for the fd parameter types in CopyFileRange). This will eventually allow to remove these functions there as well. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
1 parent 4a6a2b9 commit f2bed8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/copy_linux.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func copyFileContent(dst, src *os.File) error {
3737
return errors.Wrap(err, "unable to stat source")
3838
}
3939

40-
n, err := sysx.CopyFileRange(src.Fd(), nil, dst.Fd(), nil, int(st.Size()), 0)
40+
n, err := unix.CopyFileRange(int(src.Fd()), nil, int(dst.Fd()), nil, int(st.Size()), 0)
4141
if err != nil {
4242
if err != unix.ENOSYS && err != unix.EXDEV {
4343
return errors.Wrap(err, "copy file range failed")

0 commit comments

Comments
 (0)