FreeBSD/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c
/*
 * Given the GUID of a snapshot, find its containing filesystem and
 * (optionally) name.
 */
Given the GUID of a snapshot, find its containing filesystem and
(optionally) name.
Given the GUID of a snapshot find its containing filesystem and ( optionally ) name .
static nvlist_t *
fsavl_find(avl_tree_t *avl, uint64_t snapguid, char **snapname)
{
	fsavl_node_t fn_find;
	fsavl_node_t *fn;
	fn_find.fn_guid = snapguid;
	fn = avl_find(avl, &fn_find, NULL);
	if (fn) {
		if (snapname)
			*snapname = fn->fn_snapname;
		return (fn->fn_nvfs);
	}
	return (NULL);
}
static nvlist_t * fsavl_find ( avl_tree_t * avl , uint64_t snapguid , char * * snapname ) { fsavl_node_t fn_find ; fsavl_node_t * fn ; fn_find . fn_guid = snapguid ; fn = avl_find ( avl , & fn_find , NULL ) ; if ( fn ) { if ( snapname ) * snapname = fn -> fn_snapname ; return ( fn -> fn_nvfs ) ; } return ( NULL ) ; }
Given the GUID of a snapshot, find its containing filesystem and
 (optionally) name.
Given the GUID of a snapshot find its containing filesystem and ( optionally ) name .