summaryrefslogtreecommitdiff
path: root/minix/fs/isofs/stadir.c
blob: 926b98c25e62b442bf34e8335c68d7e83d1b9de5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#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 = get_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;
}