Exemple #1
0
/* userland only */
int ileaf_check(struct btree *btree, struct ileaf *leaf)
{
	char *why;
	why = "not an inode table leaf";
	if (leaf->magic != to_be_u16(0x90de))
		goto eek;
	why = "dict out of order";
	if (!isinorder(btree, leaf))
		goto eek;
	return 0;
eek:
	printf("%s!\n", why);
	return -1;
}
Exemple #2
0
/* userland only */
int ileaf_check(struct btree *btree, struct ileaf *leaf)
{
	struct ileaf_attr_ops *attr_ops = btree->ops->private_ops;
	char *why;

	why = "not an inode table leaf";
	if (leaf->magic != attr_ops->magic)
		goto eek;
	why = "dict out of order";
	if (!isinorder(btree, leaf))
		goto eek;
	return 0;
eek:
	tux3_err(btree->sb, "%s!", why);
	return -1;
}