FreeBSD/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
/*
 * Callback to print out the iostats for the given pool.
 */
Callback to print out the iostats for the given pool.
Callback to print out the iostats for the given pool .
int
print_iostat(zpool_handle_t *zhp, void *data)
{
	iostat_cbdata_t *cb = data;
	nvlist_t *oldconfig, *newconfig;
	nvlist_t *oldnvroot, *newnvroot;
	newconfig = zpool_get_config(zhp, &oldconfig);
	if (cb->cb_iteration == 1)
		oldconfig = NULL;
	verify(nvlist_lookup_nvlist(newconfig, ZPOOL_CONFIG_VDEV_TREE,
	    &newnvroot) == 0);
	if (oldconfig == NULL)
		oldnvroot = NULL;
	else
		verify(nvlist_lookup_nvlist(oldconfig, ZPOOL_CONFIG_VDEV_TREE,
		    &oldnvroot) == 0);
	print_vdev_stats(zhp, zpool_get_name(zhp), oldnvroot, newnvroot, cb, 0);
	if (cb->cb_verbose)
		print_iostat_separator(cb);
	return (0);
}
int print_iostat ( zpool_handle_t * zhp , void * data ) { iostat_cbdata_t * cb = data ; nvlist_t * oldconfig , * newconfig ; nvlist_t * oldnvroot , * newnvroot ; newconfig = zpool_get_config ( zhp , & oldconfig ) ; if ( cb -> cb_iteration == 1 ) oldconfig = NULL ; verify ( nvlist_lookup_nvlist ( newconfig , ZPOOL_CONFIG_VDEV_TREE , & newnvroot ) == 0 ) ; if ( oldconfig == NULL ) oldnvroot = NULL ; else verify ( nvlist_lookup_nvlist ( oldconfig , ZPOOL_CONFIG_VDEV_TREE , & oldnvroot ) == 0 ) ; print_vdev_stats ( zhp , zpool_get_name ( zhp ) , oldnvroot , newnvroot , cb , 0 ) ; if ( cb -> cb_verbose ) print_iostat_separator ( cb ) ; return ( 0 ) ; }
Callback to print out the iostats for the given pool.
Callback to print out the iostats for the given pool .
/*
	 * Print out the statistics for the pool.
	 */