sys/boot/i386/zfsboot/zfsboot.c
/*
 * Read from a dnode (which must be from a ZPL filesystem).
 */
Read from a dnode (which must be from a ZPL filesystem).
Read from a dnode ( which must be from a ZPL filesystem ) .
static int
zfs_read(spa_t *spa, const dnode_phys_t *dnode, off_t *offp, void *start, size_t size)
{
	const znode_phys_t *zp = (const znode_phys_t *) dnode->dn_bonus;
	size_t n;
	int rc;
	n = size;
	if (*offp + n > zp->zp_size)
		n = zp->zp_size - *offp;
	rc = dnode_read(spa, dnode, *offp, start, n);
	if (rc)
		return (-1);
	*offp += n;
	return (n);
}
static int zfs_read ( spa_t * spa , const dnode_phys_t * dnode , off_t * offp , void * start , size_t size ) { const znode_phys_t * zp = ( const znode_phys_t * ) dnode -> dn_bonus ; size_t n ; int rc ; n = size ; if ( * offp + n > zp -> zp_size ) n = zp -> zp_size - * offp ; rc = dnode_read ( spa , dnode , * offp , start , n ) ; if ( rc ) return ( -1 ) ; * offp += n ; return ( n ) ; }
Read from a dnode (which must be from a ZPL filesystem).
Read from a dnode ( which must be from a ZPL filesystem ) .