Skip to content
Snippets Groups Projects
Commit 05e38028 authored by Jeremy Soller's avatar Jeremy Soller Committed by GitHub
Browse files

Merge pull request #15 from ids1024/stat

Initialize fields of Stat struct to 0
parents 6c1d98ce 31cfde4e
No related branches found
No related tags found
No related merge requests found
......@@ -90,12 +90,15 @@ impl Resource for DirResource {
fn stat(&self, stat: &mut Stat, fs: &mut FileSystem) -> Result<usize> {
let node = try!(fs.node(self.block));
stat.st_dev = 0; //TODO
stat.st_ino = node.0;
stat.st_mode = node.1.mode;
stat.st_uid = node.1.uid;
stat.st_gid = node.1.gid;
stat.st_size = try!(fs.node_len(self.block));
*stat = Stat {
st_dev: 0, // TODO
st_ino: node.0,
st_mode: node.1.mode,
st_uid: node.1.uid,
st_gid: node.1.gid,
st_size: try!(fs.node_len(self.block)),
..Default::default()
};
Ok(0)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment