Exemplo n.º 1
0
Arquivo: mtree.c Projeto: taysom/tau
void stat_branch (
    branch_s	*branch,
    btree_stat_s	*bs,
    unint		height)
{
    key_s	*k;
    unint	i;

    ++bs->st_num_branches;
    bs->st_branch_recs += branch->br_num;

    stat_node(branch->br_first, bs, height);
    for (k = branch->br_key, i = 0; i < branch->br_num; k++, i++) {
        stat_node(k->k_node, bs, height);
    }
}
Exemplo n.º 2
0
static int sys_stat(int fd, uintptr_t st) {
    PTR_VALIDATE(st);
    if (FD_CHECK(fd)) {
        return stat_node(FD_ENTRY(fd), st);
    }
    return -1;
}
Exemplo n.º 3
0
static void stat_branch (
	struct address_space	*mapping,
	branch_s		*branch,
	btree_stat_s		*bs,
	unint			height)
{
	key_s	*k;
	unint	i;

	++bs->st_num_branches;
	bs->st_branch_recs += branch->br_num;

	stat_node(mapping, branch->br_first, bs, height);
	for (k = branch->br_key, i = 0; i < branch->br_num; k++, i++) {
		stat_node(mapping, k->k_block, bs, height);
	}
}
Exemplo n.º 4
0
static int sys_statf(char * file, uintptr_t st) {
    int result;
    PTR_VALIDATE(file);
    PTR_VALIDATE(st);
    fs_node_t * fn = kopen(file, 0);
    result = stat_node(fn, st);
    if (fn)
        close_fs(fn);
    return result;
}
Exemplo n.º 5
0
Arquivo: mtree.c Projeto: taysom/tau
void stat_tree (tree_s *tree, btree_stat_s *bs)
{
    zero(*bs);
    bs->st_blk_size = PAGE_SIZE;
    stat_node(root(tree), bs, 1);
}
Exemplo n.º 6
0
void tau_stat_tree (tree_s *tree, btree_stat_s *bs)
{
	zero(*bs);
	bs->st_blk_size = BLK_SIZE;
	stat_node(tree_inode(tree), root(tree), bs, 1);
}