summaryrefslogtreecommitdiff
path: root/src/sys/stat.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/sys/stat.rs')
-rw-r--r--src/sys/stat.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/sys/stat.rs b/src/sys/stat.rs
index 9c0129f5..1f0d728a 100644
--- a/src/sys/stat.rs
+++ b/src/sys/stat.rs
@@ -53,22 +53,22 @@ pub fn mknod<P: ?Sized + NixPath>(path: &P, kind: SFlag, perm: Mode, dev: dev_t)
#[cfg(target_os = "linux")]
pub fn major(dev: dev_t) -> u64 {
- ((dev >> 32) & 0xfffff000) |
- ((dev >> 8) & 0x00000fff)
+ ((dev >> 32) & 0xffff_f000) |
+ ((dev >> 8) & 0x0000_0fff)
}
#[cfg(target_os = "linux")]
pub fn minor(dev: dev_t) -> u64 {
- ((dev >> 12) & 0xffffff00) |
- ((dev ) & 0x000000ff)
+ ((dev >> 12) & 0xffff_ff00) |
+ ((dev ) & 0x0000_00ff)
}
#[cfg(target_os = "linux")]
pub fn makedev(major: u64, minor: u64) -> dev_t {
- ((major & 0xfffff000) << 32) |
- ((major & 0x00000fff) << 8) |
- ((minor & 0xffffff00) << 12) |
- ((minor & 0x000000ff) )
+ ((major & 0xffff_f000) << 32) |
+ ((major & 0x0000_0fff) << 8) |
+ ((minor & 0xffff_ff00) << 12) |
+ (minor & 0x0000_00ff)
}
pub fn umask(mode: Mode) -> Mode {