64-bit stat size, read entire executable in one go

This commit is contained in:
Jeremy Soller 2016-09-28 20:42:03 -06:00
parent 83ff36a4c3
commit 5e1d2f8c64
6 changed files with 12 additions and 24 deletions

View file

@ -159,7 +159,7 @@ impl Scheme for EnvScheme {
let handle = handles.get(&id).ok_or(Error::new(EBADF))?;
stat.st_mode = handle.mode;
stat.st_size = handle.data.lock().len() as u32; //TODO: st_size 64-bit
stat.st_size = handle.data.lock().len() as u64;
Ok(0)
}

View file

@ -130,7 +130,7 @@ impl Scheme for InitFsScheme {
let handle = handles.get(&id).ok_or(Error::new(EBADF))?;
stat.st_mode = handle.mode;
stat.st_size = handle.data.len() as u32; //TODO: st_size 64-bit
stat.st_size = handle.data.len() as u64;
Ok(0)
}