Skip to content
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

make statfs/statvfs to be available everywhere #832

Merged
merged 1 commit into from
Feb 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Added `alarm`. ([#830](https://github.com/nix-rust/nix/pull/830))
- Added interface flags `IFF_NO_PI, IFF_TUN, IFF_TAP` on linux-like systems.
([#853](https://github.com/nix-rust/nix/pull/853))
- Added `statvfs` module to all MacOS and Linux architectures.
([#832](https://github.com/nix-rust/nix/pull/832))

### Changed
- Display and Debug for SysControlAddr now includes all fields.
Expand Down
12 changes: 1 addition & 11 deletions src/sys/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,9 @@ pub mod socket;

pub mod stat;

#[cfg(all(target_os = "linux",
any(target_arch = "x86",
target_arch = "x86_64",
target_arch = "arm")),
)]
#[cfg(any(target_os = "android", target_os = "linux", target_os = "macos"))]
pub mod statfs;

#[cfg(all(any(target_os = "linux",
target_os = "macos"),
any(target_arch = "x86",
target_arch = "x86_64",
target_arch = "arm")),
)]
pub mod statvfs;

pub mod termios;
Expand Down
6 changes: 3 additions & 3 deletions src/sys/statvfs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ libc_bitflags!(
#[cfg(any(target_os = "android", target_os = "linux"))]
ST_MANDLOCK;
/// Write on file/directory/symlink
#[cfg(any(target_os = "android", target_os = "linux"))]
#[cfg(target_os = "linux")]
ST_WRITE;
/// Append-only file
#[cfg(any(target_os = "android", target_os = "linux"))]
#[cfg(target_os = "linux")]
ST_APPEND;
/// Immutable file
#[cfg(any(target_os = "android", target_os = "linux"))]
#[cfg(target_os = "linux")]
ST_IMMUTABLE;
/// Do not update access times on files
#[cfg(any(target_os = "android", target_os = "linux"))]
Expand Down