Age | Commit message (Collapse) | Author |
|
This is more type-safe. Also, the old code wasn't cross-platform at all even
though it claimed to be. It wasn't even portable across architectures on
Linux.
|
|
|
|
|
|
* Fixed an unused_import error in `termios.rs` for Android.
* Fixed undefined references to `preadv` and `pwritev` for Android -
At least they don't exist from API level 3 to 21.
* Fixed the uid > 0 and gid > 0 checks in `stat`'s tests - Running the
tests by root is possible, especially when running on a rooted Android
device.
Those changes made rust-nix buildable (again) on Android. All the tests
passed as well.
|
|
Fixes #165
|
|
|
|
|
|
* Extend the enums in WaitStatus to include all process states (signaled,
stopped, exited, continued).
* Decode status from waitpid
* Return appropate WaitStatus
* Update tests to use the new WaitStatus
* Add new tests for specific status values
|
|
|
|
|
|
On an encrypted filesystem everything acts like a symlink
$ stat baz
File: ‘baz’
Size: 0 Blocks: 16 IO Block: 4096 regular empty file
Device: 26h/38d Inode: 6835152 Links: 1
Access: (0664/-rw-rw-r--) Uid: ( 1000/ posix4e) Gid: ( 1000/ posix4e)
Access: 2015-07-10 11:11:21.846851777 -0700
Modify: 2015-07-10 11:11:21.846851777 -0700
Change: 2015-07-10 11:11:21.846851777 -0700
Birth: -
|
|
|
|
|
|
|
|
|
|
nightly will comment this with:
---
src/unistd.rs:241:13: 241:20 error: variable does not need to be mutable, #[deny(unused_mut)] on by default
src/unistd.rs:241 let mut res;
---
|
|
|
|
|
|
|
|
|
|
Fix the boundary condition so that we never call
Rng::gen_range(64, 64).
Helps #144
|
|
Closes #138
|
|
|
|
|
|
Derive some more traits on flock to make life easier
Change fcntl to return Result<c_int> so we can get results of F_GET*
ops. Change pipe2_setflags to match.
|
|
|
|
|
|
This fixes compile for 32 bit systems like certain ARM
|
|
* Split SockOpt trait into GetSockOpt and SetSockOpt.
* Add support for TCP_KEEPALIVE & TCP_KEEPIDLE
|
|
|
|
|
|
|
|
Some of the tests are currently unrunnable, but the basic library is at least
buildable.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
A timeout of -1 makes epoll block indefinitely, a usize timeout means we can't specify this behavior; using isize fixes this.
|
|
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
|
|
|
|
|
|
libc::funcs::bsd43::shutdown is used
|
|
|
|
|
|
|
|
Two problems were fixed:
1. All of the comments for the module were prefixed with `///!` instead
of just `//!`
2. There was no newline before lists which is required in markdown, so
they were not rendering correctly.
|
|
The ioctl interface expected by most external parties is that of
an unsigned long (c_ulong). The libc crate expects as an int. This
change exposes c_ulong (via ioctl_op_t) to external users and
casts to c_int before calling the libc function.
The only documentation in SUSv3 for ioctl has to do with stream
devices. The support documented there is not widely supported (it
is not supported by the Linux kernel)[1].
[1] The Linux Programming Interface, Page 86.
|