summaryrefslogtreecommitdiff
path: root/src/sys/stat.rs
AgeCommit message (Collapse)Author
2017-06-18Update bitflags to 0.9equal-l2
2017-03-21add support for `fstatat`Jörg Thalheim
2017-02-19Fix the style for bitflags!Mathias Svensson
Prefer libc_bitflags! over bitflags!. Prefer libc::CONSTANTS over writing the constant manually.
2017-02-18Auto merge of #508 - aidanhs:aphs-major-minor-macros, r=posborneHomu
Implement major/minor macros, correct mkdev It appears that the previous `mkdev` was based on the kernel headers (https://github.com/torvalds/linux/blob/v4.7/include/linux/kdev_t.h#L6) which (I guess) is the internal kernel dev_t. Scrolling down the file you can see some bitshifting operations to do conversions. The new implementation(s) are based on [musl](http://git.musl-libc.org/cgit/musl/tree/include/sys/sysmacros.h?id=dbbb3734d8c0176feabd6c46e2e85bbc3b8a60af) and [glibc](https://github.molgen.mpg.de/git-mirror/glibc/blob/20003c49884422da7ffbc459cdeee768a6fee07b/sysdeps/unix/sysv/linux/sys/sysmacros.h#L38), which are in agreement about how dev_t should be handled. (as it happens I suspect we could omit the shift by 32 since I don't see that in the kernel headers, but doesn't hurt to take the conservative route and mimic the libcs)
2017-02-17Implement major/minor macros, correct mkdevAidan Hobson Sayers
2017-02-16Update bitflags to 0.7Simon Sapin
2016-04-20Last few constantsarcnmx
2016-04-19Use constants from libcarcnmx
2016-04-18Add some missing SFlagsarcnmx
2016-01-28Move errno::Result back to crate rootarcnmx
2016-01-28Errno::result()arcnmx
2015-08-12Update some stuff for upstream bitflags changesCorey Richardson
2015-05-28Remove std::os::unix::io::RawFd re-exportCarl Lerche
2015-05-21Fix NixPath yield with CStr instead of OsStrCarl Lerche
As described in #117, the `AsExtStr` trait is defined to return a raw `*const libc::c_char`. Its impl for `OsStr` simply borrowed the byte slice from its `OsStr` argument and cast it to a `*const libc::c_char`, which does not construct a proper null-terminated C string. Given this, the `AsExtStr` is not necessary and is removed. `NixPath` is updated to yield `CStr`. Fixes #117, #120 Thanks to @dead10ck
2015-05-08Add lstatSkyler Hawthorne
2015-03-24NixResult -> nix::Result; NixError -> nix::ErrorCarl Lerche
2015-02-27Further SockAddr & NixPath cleanupCarl Lerche
2015-02-10Add `NixPath`, `NixError`, and `NixResult`.Utkarsh Kukreti
2015-02-06path -> old_pathFlorian Hartwig
2015-01-27Fix warnings for `rustc 1.0.0-dev (e365e4c05 2015-01-27 08:40:39)`.Utkarsh Kukreti
2015-01-27Add a `Mode` bitflags and use it instead of `std::io::FilePermission`.Utkarsh Kukreti
These constants are defined in POSIX [1] so we should export them anyways, plus we don't need to depend on `std::io` anymore! [breaking-change] [1]: http://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/stat.h.html
2015-01-13changed uint and int to usize and isize respectivelyRick Richardson
2015-01-07ToCStr removal falloutValerii Hiora
2015-01-03Update to rust masterValerii Hiora
- cstr fallout - deriving -> derive - lib stabilization warnings removal
2014-12-18Add all now needed ';' after macro invocations.Victor Berger
2014-12-15bitflags! derives Copy for you now, so remove our derivings.Jonathan Reem
2014-12-10Fallout of Copy becoming opt-in.Victor Berger
2014-10-10Update static->constTilde Engineering
2014-10-06Fix warningsCarl Lerche
2014-10-06Bind stat and fstatTilde Engineering
2014-08-20Start binding DarwinCarl Lerche
2014-08-16Epoll, rename to nix, misc cleanupCarl Lerche