FreeBSD/cddl/contrib/opensolaris/cmd/zpool/zpool_iter.c
/*
 * High level function which iterates over all pools given on the command line,
 * using the pool_list_* interfaces.
 */
High level function which iterates over all pools given on the command line,
using the pool_list_* interfaces.
High level function which iterates over all pools given on the command line using the pool_list_ * interfaces .
int
for_each_pool(int argc, char **argv, boolean_t unavail,
    zprop_list_t **proplist, zpool_iter_f func, void *data)
{
	zpool_list_t *list;
	int ret = 0;
	if ((list = pool_list_get(argc, argv, proplist, &ret)) == NULL)
		return (1);
	if (pool_list_iter(list, unavail, func, data) != 0)
		ret = 1;
	pool_list_free(list);
	return (ret);
}
int for_each_pool ( int argc , char * * argv , boolean_t unavail , zprop_list_t * * proplist , zpool_iter_f func , void * data ) { zpool_list_t * list ; int ret = 0 ; if ( ( list = pool_list_get ( argc , argv , proplist , & ret ) ) == NULL ) return ( 1 ) ; if ( pool_list_iter ( list , unavail , func , data ) != 0 ) ret = 1 ; pool_list_free ( list ) ; return ( ret ) ; }
High level function which iterates over all pools given on the command line,
 using the pool_list_* interfaces.
High level function which iterates over all pools given on the command line using the pool_list_ * interfaces .