phunix/minix/fs/isofs/stadir.c
David van Moolenbroek c2f99d7c3a isofs: rename source directory to "isofs"
Change-Id: Ibe630f720b4399e7ebbbd850650036fbaa9cec7b
2014-09-18 13:00:57 +00:00

34 lines
609 B
C

#include "inc.h"
#include <sys/stat.h>
#include <sys/statvfs.h>
int fs_stat(ino_t ino_nr, struct stat *statbuf)
{
struct inode *rip;
if ((rip = find_inode(ino_nr)) == NULL)
return EINVAL;
*statbuf = rip->i_stat;
return OK;
}
int fs_statvfs(struct statvfs *st)
{
st->f_flag = ST_NOTRUNC;
st->f_bsize = v_pri.logical_block_size_l;
st->f_frsize = st->f_bsize;
st->f_iosize = st->f_bsize;
st->f_blocks = v_pri.volume_space_size_l;
st->f_namemax = NAME_MAX;
return OK;
}
void fs_blockstats(u64_t *blocks, u64_t *free, u64_t *used)
{
*used = *blocks = v_pri.volume_space_size_l;
*free = 0;
}