FreeBSD/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c
/*
 * Called when an ioctl() which returns an nvlist fails with ENOMEM.  This will
 * expand the nvlist to the size specified in 'zc_nvlist_dst_size', which was
 * filled in by the kernel to indicate the actual required size.
 */
Called when an ioctl() which returns an nvlist fails with ENOMEM.  This will
expand the nvlist to the size specified in 'zc_nvlist_dst_size', which was
filled in by the kernel to indicate the actual required size.
Called when an ioctl () which returns an nvlist fails with ENOMEM . This will expand the nvlist to the size specified in ' zc_nvlist_dst_size ' which was filled in by the kernel to indicate the actual required size .
int
zcmd_expand_dst_nvlist(libzfs_handle_t *hdl, zfs_cmd_t *zc)
{
	free((void *)(uintptr_t)zc->zc_nvlist_dst);
	zc->zc_nvlist_dst =
	    (uint64_t)(uintptr_t)zfs_alloc(hdl, zc->zc_nvlist_dst_size);
	if (zc->zc_nvlist_dst == 0)
		return (-1);
	return (0);
}
int zcmd_expand_dst_nvlist ( libzfs_handle_t * hdl , zfs_cmd_t * zc ) { free ( ( void * ) ( uintptr_t ) zc -> zc_nvlist_dst ) ; zc -> zc_nvlist_dst = ( uint64_t ) ( uintptr_t ) zfs_alloc ( hdl , zc -> zc_nvlist_dst_size ) ; if ( zc -> zc_nvlist_dst == 0 ) return ( -1 ) ; return ( 0 ) ; }
Called when an ioctl() which returns an nvlist fails with ENOMEM.
Called when an ioctl () which returns an nvlist fails with ENOMEM .