FreeBSD/cddl/contrib/opensolaris/cmd/zpool/zpool_iter.c
/*
 * Remove the given pool from the list.  When running iostat, we want to remove
 * those pools that no longer exist.
 */
Remove the given pool from the list.  When running iostat, we want to remove
those pools that no longer exist.
Remove the given pool from the list . When running iostat we want to remove those pools that no longer exist .
void
pool_list_remove(zpool_list_t *zlp, zpool_handle_t *zhp)
{
	zpool_node_t search, *node;
	search.zn_handle = zhp;
	if ((node = uu_avl_find(zlp->zl_avl, &search, NULL, NULL)) != NULL) {
		uu_avl_remove(zlp->zl_avl, node);
		zpool_close(node->zn_handle);
		free(node);
	}
}
void pool_list_remove ( zpool_list_t * zlp , zpool_handle_t * zhp ) { zpool_node_t search , * node ; search . zn_handle = zhp ; if ( ( node = uu_avl_find ( zlp -> zl_avl , & search , NULL , NULL ) ) != NULL ) { uu_avl_remove ( zlp -> zl_avl , node ) ; zpool_close ( node -> zn_handle ) ; free ( node ) ; } }
Remove the given pool from the list.
Remove the given pool from the list .