FreeBSD/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
/*
 * Generic callback function to list a pool.
 */
Generic callback function to list a pool.
Generic callback function to list a pool .
int
list_callback(zpool_handle_t *zhp, void *data)
{
	list_cbdata_t *cbp = data;
	nvlist_t *config;
	nvlist_t *nvroot;
	config = zpool_get_config(zhp, NULL);
	print_pool(zhp, cbp);
	if (!cbp->cb_verbose)
		return (0);
	verify(nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE,
	    &nvroot) == 0);
	print_list_stats(zhp, NULL, nvroot, cbp, 0);
	return (0);
}
int list_callback ( zpool_handle_t * zhp , void * data ) { list_cbdata_t * cbp = data ; nvlist_t * config ; nvlist_t * nvroot ; config = zpool_get_config ( zhp , NULL ) ; print_pool ( zhp , cbp ) ; if ( ! cbp -> cb_verbose ) return ( 0 ) ; verify ( nvlist_lookup_nvlist ( config , ZPOOL_CONFIG_VDEV_TREE , & nvroot ) == 0 ) ; print_list_stats ( zhp , NULL , nvroot , cbp , 0 ) ; return ( 0 ) ; }
Generic callback function to list a pool.
Generic callback function to list a pool .