summaryrefslogtreecommitdiff
path: root/src/sys/quota.rs
diff options
context:
space:
mode:
authorMathias Svensson <idolf@pwnies.dk>2017-01-31 21:08:51 +0100
committerMathias Svensson <idolf@pwnies.dk>2017-02-19 08:41:47 +0100
commitab453e40e32d32766ac72bfb6b9cf6e5b02e68c5 (patch)
tree8cfc2ee9c0d3460258cc39103591356ccb68cd2a /src/sys/quota.rs
parente7629f3e91535464c5857820dfc18ac0795a6893 (diff)
downloadnix-ab453e40e32d32766ac72bfb6b9cf6e5b02e68c5.zip
Fix the style for bitflags!
Prefer libc_bitflags! over bitflags!. Prefer libc::CONSTANTS over writing the constant manually.
Diffstat (limited to 'src/sys/quota.rs')
-rw-r--r--src/sys/quota.rs24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/sys/quota.rs b/src/sys/quota.rs
index 321156ec..b66d558d 100644
--- a/src/sys/quota.rs
+++ b/src/sys/quota.rs
@@ -7,7 +7,7 @@ use libc::{c_int, c_char};
target_arch = "arm")),
)]
pub mod quota {
- use libc::c_int;
+ use libc::{self, c_int};
pub struct QuotaCmd(pub QuotaSubCmd, pub QuotaType);
pub type QuotaSubCmd = c_int;
@@ -39,19 +39,19 @@ pub mod quota {
pub const QFMT_VFS_V0: QuotaFmt = 2;
pub const QFMT_VFS_V1: QuotaFmt = 4;
- bitflags!(
+ libc_bitflags!(
#[derive(Default)]
pub flags QuotaValidFlags: u32 {
- const QIF_BLIMITS = 1,
- const QIF_SPACE = 2,
- const QIF_ILIMITS = 4,
- const QIF_INODES = 8,
- const QIF_BTIME = 16,
- const QIF_ITIME = 32,
- const QIF_LIMITS = QIF_BLIMITS.bits | QIF_ILIMITS.bits,
- const QIF_USAGE = QIF_SPACE.bits | QIF_INODES.bits,
- const QIF_TIMES = QIF_BTIME.bits | QIF_ITIME.bits,
- const QIF_ALL = QIF_LIMITS.bits | QIF_USAGE.bits | QIF_TIMES.bits
+ QIF_BLIMITS,
+ QIF_SPACE,
+ QIF_ILIMITS,
+ QIF_INODES,
+ QIF_BTIME,
+ QIF_ITIME,
+ QIF_LIMITS,
+ QIF_USAGE,
+ QIF_TIMES,
+ QIF_ALL,
}
);