1 #include "inc.h" 2 #include <sys/stat.h> 3 #include <sys/statvfs.h> 4 fs_stat(ino_t ino_nr,struct stat * statbuf)5int fs_stat(ino_t ino_nr, struct stat *statbuf) 6 { 7 struct inode *rip; 8 9 if ((rip = get_inode(ino_nr)) == NULL) 10 return EINVAL; 11 12 *statbuf = rip->i_stat; 13 14 return OK; 15 } 16 fs_statvfs(struct statvfs * st)17int fs_statvfs(struct statvfs *st) 18 { 19 st->f_flag = ST_NOTRUNC; 20 st->f_bsize = v_pri.logical_block_size_l; 21 st->f_frsize = st->f_bsize; 22 st->f_iosize = st->f_bsize; 23 st->f_blocks = v_pri.volume_space_size_l; 24 st->f_namemax = NAME_MAX; 25 26 return OK; 27 } 28