This commit is contained in:
jD91mZM2
2018-09-21 08:04:38 +02:00
parent 9e9b850b90
commit 64acfbb8e3
2 changed files with 10 additions and 6 deletions
+8 -4
View File
@@ -8,11 +8,15 @@ use platform;
use platform::types::*;
use platform::{Line, RawFile, RawLineBuffer};
#[cfg(target_os = "linux")] mod linux;
#[cfg(target_os = "redox")] mod redox;
#[cfg(target_os = "linux")]
mod linux;
#[cfg(target_os = "redox")]
mod redox;
#[cfg(target_os = "linux")] use self::linux as sys;
#[cfg(target_os = "redox")] use self::redox as sys;
#[cfg(target_os = "linux")]
use self::linux as sys;
#[cfg(target_os = "redox")]
use self::redox as sys;
#[repr(C)]
pub struct passwd {
+2 -2
View File
@@ -5,11 +5,11 @@ pub fn split(line: &[u8]) -> [&[u8]; 7] {
parts[0] = iter.next().unwrap_or(&[]);
// Skip passwd
for i in 0..2 {
parts[2+i] = iter.next().unwrap_or(&[]);
parts[2 + i] = iter.next().unwrap_or(&[]);
}
// Skip gecos
for i in 0..2 {
parts[5+i] = iter.next().unwrap_or(&[]);
parts[5 + i] = iter.next().unwrap_or(&[]);
}
parts
}