diff options
author | kaashoek <kaashoek> | 2006-08-12 04:33:50 +0000 |
---|---|---|
committer | kaashoek <kaashoek> | 2006-08-12 04:33:50 +0000 |
commit | 1f544842ceb5af73b1f2b13222d72dd4ad7cd08a (patch) | |
tree | 49ad1096c0ad43c591c493166ff752a3e7cfd7cd /fs.c | |
parent | 0633b9715e106ac97fafcf3a68c06da1f0cf873a (diff) | |
download | xv6-labs-1f544842ceb5af73b1f2b13222d72dd4ad7cd08a.tar.gz xv6-labs-1f544842ceb5af73b1f2b13222d72dd4ad7cd08a.tar.bz2 xv6-labs-1f544842ceb5af73b1f2b13222d72dd4ad7cd08a.zip |
fstat
primitive ls
Diffstat (limited to 'fs.c')
-rw-r--r-- | fs.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -1,4 +1,5 @@ #include "types.h" +#include "stat.h" #include "param.h" #include "x86.h" #include "mmu.h" @@ -270,6 +271,16 @@ bmap(struct inode *ip, uint bn) #define min(a, b) ((a) < (b) ? (a) : (b)) +void +stati(struct inode *ip, struct stat *st) +{ + st->st_dev = ip->dev; + st->st_ino = ip->inum; + st->st_type = ip->type; + st->st_nlink = ip->nlink; + st->st_size = ip->size; +} + int readi(struct inode *ip, char *dst, uint off, uint n) { |