Skip to content

fix: copy_file_range fd_in arg on Linux/Android #2173

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 6, 2023

Conversation

SteveLauC
Copy link
Member

What does this PR do

Fix the fd_in argument of the copy_file_range(2) syscall on Linux/Andorid

Checklist:

  • I have read CONTRIBUTING.md
  • I have written necessary tests and rustdoc comments
  • A change log has been added if this PR modifies nix's API

Well, I have no idea how the test passed before this...

@SteveLauC
Copy link
Member Author

SteveLauC commented Oct 22, 2023

Oh I get it now, our unit test is using BorrowedFd, which has the same memory representation as RawFd, so it passed without any issue, in my use case, I was using a reference to a File, so I got the EBADF error

@asomers
Copy link
Member

asomers commented Nov 4, 2023

Good catch, but why [skip ci]?

@SteveLauC
Copy link
Member Author

but why [skip ci]?

To save our cirrus CI usage, but it should be needless now, let me remove it

@SteveLauC SteveLauC changed the title [skip ci] fix: copy_file_range fd_in arg on Linux/Android fix: copy_file_range fd_in arg on Linux/Android Nov 5, 2023
@SteveLauC SteveLauC added this pull request to the merge queue Nov 5, 2023
Merged via the queue into nix-rust:master with commit ad60784 Nov 6, 2023
@SteveLauC SteveLauC deleted the fix_copy_file_range branch November 6, 2023 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants