/* mzap_lookup: Looks up property described by "name" and returns the value in "value".  */
static int mzap_lookup(mzap_phys_t *zapobj, zfs_endian_t endian, int objsize, char *name, uint64_t *value)
/* mzap_lookup: Looks up property described by "name" and returns the value in "value".  */
static int mzap_lookup(mzap_phys_t *zapobj, zfs_endian_t endian, int objsize, char *name, uint64_t *value)
{
	int i, chunks;
	mzap_ent_phys_t *mzap_ent = zapobj->mz_chunk;
	chunks = objsize / MZAP_ENT_LEN - 1;
	for (i = 0; i < chunks; i++) {
		if (strcmp(mzap_ent[i].mze_name, name) == 0) {
			*value = zfs_to_cpu64(mzap_ent[i].mze_value, endian);
			return ZFS_ERR_NONE;
		}
	}
	printf("couldn't find '%s'\n", name);
	return ZFS_ERR_FILE_NOT_FOUND;
}