summaryrefslogtreecommitdiff
path: root/src/fcntl.rs
AgeCommit message (Collapse)Author
2020-06-27misc clippy cleanupAlan Somers
2020-05-31Convert the crate to edition 2018Alan Somers
2020-05-17Make sure to leave the values as-is in openXavier L'Heureux
2020-05-17Remove more unsupported functions and make it possible to run testsXavier L'Heureux
2020-05-17Add Redox support for most of the modulesXavier L'Heureux
Some things are not implemented yet in redox, so a lot of annotations were added to remove functions when compiling for redox. Those functions will hopefully be added in time, but for now it's better to have partial support than none. Blocked by https://github.com/rust-lang/libc/pull/1438
2020-05-10Add support for reading symlinks longer than `PATH_MAX` to `readlink` and ↵Solra Bizna
`readlinkat`
2020-04-08Merge #1195bors[bot]
1195: Implement open file descriptor locks in fcntl r=asomers a=andrenth Hello This PR updates libc to 0.2.68, which adds the `F_OFD_*` fcntl commands, and uses them in `nix::fcntl::fcntl`. Co-authored-by: Andre Nathan <andre@digirati.com.br>
2020-03-28Fix fallocate return typeDiana
Untested, done on github. Fixes #1200
2020-03-17Handle open file descriptor locks in fcntlAndre Nathan
2019-11-03Implment linkatJohnnie Birch
This adds the linkat function which is part of POSIX: http://pubs.opengroup.org/onlinepubs/9699919799/functions/linkat.html and widely implmented on Unix-Family platforms. Add back trailing whitespace removed on previous force push
2019-09-12posix_fallocateDing Xiang Fei
2019-08-29Clippy: remove an unused lifetime parameterAlan Somers
2019-08-29Clippy cleanupAlan Somers
2019-08-22updated changelogSendil Kumar
2019-08-22fix review commentsSendil Kumar
2019-08-22update readlink to return the path instead of mangling the bufferSendil Kumar
2019-08-22fix readlink/readlinkat to return too long only when it is longSendil Kumar
2019-07-17Add renameatScott Lamb
renameat is (somewhat oddly, imho) in stdio.h. I put it in nix::fcntl because there's no nix::stdio and all its friends (including the AT_* constants) are in nix::fcntl.
2019-07-14Implement unlinkatJohnnie Birch
This adds the unlinkat function, which is part of POSIX: http://pubs.opengroup.org/onlinepubs/9699919799/functions/unlinkat.html and widely implmented on Unix-family platforms. Implement unlinkat - Update comments to unlink at and breakup tests Changes made based on comments from pull request #1058 Implement unlinkat - Update should_panic for more precise check Updae should_panic attribute for more precise check. Also remove some dead code and note the pull request ID. Implement unlinkat - Update error handling to use unwrap_err The previous patch failed testing on two targets that returned EPERM as the Sys error instead of EISDIR. This patch changes from using the should_panic attribute to using the unwrap_err and matching against the result. Implement Unlinkat - Passing tests should not print anything. Fix. Implement unlinkat - Update location of commit comment in the CHANGELOG Implement unlinkat - Remove newline
2019-07-09implement posix_fadviseKevin Wern
2019-06-12Implement `copy_file_range()`Árni Dagur
2019-06-09Add extra traits for all typesBryant Mairs
Derive Clone, Copy, Eq, Hash, and PartialEq for all types. Not all traits are supported by all types, which is why many are missing some.
2019-05-23Update fcntl.rsJakub Konka
Just a minor typo in the docs of `O_RDWR`. It read: ``` /// Allow both reading and writing. /// /// This should not be combined with `O_WRONLY` or `O_RDWR`. O_RDWR; ``` but I believe it should read ``` /// Allow both reading and writing. /// /// This should not be combined with `O_WRONLY` or `O_RDONLY`. O_RDWR; ``` instead :-)
2018-12-08Replace try! with ?Alan Somers
try! is not available in Rust 2018
2018-10-19Add a fchownat(2) wrapperJulio Merino
2018-01-28Require Debug impls for all typesBryant Mairs
2018-01-28Implement Copy/Clone for all types missing itBryant Mairs
2018-01-28Deny unused qualificationsBryant Mairs
2017-12-20Remove unnecessary lifetime annotationsBryant Mairs
2017-12-19Fix support for DragonFlyMichael Neumann
* DragonFly does not have a O_DSYNC flag * Fix type_of_cmsg_data on DragonFly * No fexecve() on DragonFly * Do not run aio test cases on DragonFly * Keep target lists in alphabetical order * Unscrable #[cfg] directives and use cfg_if! macro instead * Fix errno on DragonFly Below follows an explanation why we have to use a C extension to get errno working on DragonFly: DragonFly uses a thread-local errno variable, but #[thread_local] is feature-gated and not available in stable Rust as of this writing (Rust 1.21.0). We have to use a C extension (src/errno_dragonfly.c) to access it. Tracking issue for `thread_local` stabilization: https://github.com/rust-lang/rust/issues/29594 Once this becomes stable, we can remove build.rs, src/errno_dragonfly.c, remove the build-dependency from Cargo.toml, and use: extern { #[thread_local] static errno: c_int; } Now all targets will use the build.rs script, but only on DragonFly this will do something. Also, there are no additional dependencies for targets other than DragonFly (no gcc dep).
2017-12-04Stop reexporting `Errno` and its variantsJonas Schievink
cc #664 (unsure if this is everything needed)
2017-10-07Add support for 'fallocate'Sanchayan Maity
2017-08-29Use upstream libc definitions for fcntl FFIBryant Mairs
2017-08-16Remove ugly libc_bitflags hack for mac/ios.Bryant Mairs
2017-08-16Match libc_bitflags! syntax to upstream bitflags!Bryant Mairs
2017-07-05Wrap lines to keep them under 100 charsequal-l2
2017-07-05Unify BSD constsequal-l2
2017-07-05Fix libc is not viable with netbsdequal-l2
2017-07-04Use libc_bitflags! for BSD in fcntl.rsequal-l2
2017-06-20Merge #622bors[bot]
622: Separate OpenBSD and FreeBSD in fcntl.rs r=asomers Those two OSes cannot be together since the following FreeBSD flags aren't available on OpenBSD. - `O_DIRECT` - `O_EXEC` - `O_TTY_INIT`
2017-06-19Separate OpenBSD and FreeBSD in fcntl.rsequal-l2
2017-06-18Update bitflags to 0.9equal-l2
2017-03-22add support `readlink|readlinkat`Jörg Thalheim
2017-03-21add support for `openat`Jörg Thalheim
2017-02-28fcntl: Expose FcntlArg variants at the module levelKamal Marhubi
This allows importing them directly from `nix::fcntl` which is more ergonomic than needing to use them via `FcntlArg`.
2017-02-27fcntl: Support getting and setting pipe size on LinuxKamal Marhubi
2017-02-19Fix the style for bitflags!Mathias Svensson
Prefer libc_bitflags! over bitflags!. Prefer libc::CONSTANTS over writing the constant manually.
2017-02-16Update bitflags to 0.7Simon Sapin
2016-08-26Add FcntlArg::F_FULLFSYNCMarkus Unterwaditzer
https://developer.apple.com/library/ios/documentation/System/Conceptual/ManPages_iPhoneOS/man2/fsync.2.html
2016-04-20fcntl: Use bindings from libc instead of our ownBrian Pearce