-
Notifications
You must be signed in to change notification settings - Fork 673
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
Added lseek and seek64 #377
Conversation
tmp.read_to_string(&mut buf).unwrap(); | ||
assert_eq!(b"f123456", buf.as_bytes()); | ||
|
||
close(tmp.as_raw_fd()).unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: spacing in function seems inconsistent (some of it is 5 spaces)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about that, I rushed a bit, I will fix it.
Please also squash commits down to a single commit as well. |
llseek and lseek64 impl Whence fixed formatting awful typo when refactoring no llseek wrong test name using off64_t got rid of offset Added SeekHole/Data; formatted test; SeekCur/Set/End use libc constants
All done, let me know if anything else has to be fixed. |
Sorry for the delay @aoprisan. A couple minor things remain, but we can probably address these in the future:
That being said, that can all be fixed later. So, @homu r+ |
📌 Commit 0eb8b4b has been approved by |
Added lseek and seek64 I have added lseek and seek64 to unistd, the last one targeting Linux/Android only. I wasn't sure where to place the Whence enum, or if it's a nice of doing, I am quite fresh to Rust.
Relates to nix-rust/nix#377. These constants are only available in systems running the Linux kernel. Signed-off-by: Paul Osborne <[email protected]>
Relates to nix-rust/nix#377. These constants are only available in systems running the Linux kernel and are not defined in musl libc (yet). Signed-off-by: Paul Osborne <[email protected]>
Add SEEK_DATA/SEEK_HOLE constants Relates to nix-rust/nix#377. These constants are only available in systems running the Linux kernel.
I have added lseek and seek64 to unistd, the last one targeting Linux/Android only. I wasn't sure where to place the Whence enum, or if it's a nice of doing, I am quite fresh to Rust.