FreeBSD/sbin/growfs/growfs.c
/*
 * Here we read some block(s) from disk.
 */
Here we read some block(s) from disk.
Here we read some block ( s ) from disk .
static void
rdfs(ufs2_daddr_t bno, size_t size, void *bf, int fsi)
{
	DBG_FUNC("rdfs")
	ssize_t	n;
	DBG_ENTER;
	if (bno < 0)
		err(32, "rdfs: attempting to read negative block number");
	if (lseek(fsi, (off_t)bno * DEV_BSIZE, 0) < 0)
		err(33, "rdfs: seek error: %jd", (intmax_t)bno);
	n = read(fsi, bf, size);
	if (n != (ssize_t)size)
		err(34, "rdfs: read error: %jd", (intmax_t)bno);
	DBG_LEAVE;
	return;
}
static void rdfs ( ufs2_daddr_t bno , size_t size , void * bf , int fsi ) { DBG_FUNC ( " " ) ssize_t n ; DBG_ENTER ; if ( bno < 0 ) err ( 32 , " " ) ; if ( lseek ( fsi , ( off_t ) bno * DEV_BSIZE , 0 ) < 0 ) err ( 33 , " " , ( intmax_t ) bno ) ; n = read ( fsi , bf , size ) ; if ( n != ( ssize_t ) size ) err ( 34 , " " , ( intmax_t ) bno ) ; DBG_LEAVE ; return ; }
Here we read some block(s) from disk.
Here we read some block ( s ) from disk .