예제 #1
0
파일: affs.c 프로젝트: kissthink/os-grub2
/* Read LEN bytes from the file described by DATA starting with byte
   POS.  Return the amount of read bytes in READ.  */
static grub_ssize_t
grub_affs_read_file (grub_fshelp_node_t node,
		     void NESTED_FUNC_ATTR (*read_hook) (grub_disk_addr_t sector,
					unsigned offset, unsigned length),
		     int pos, grub_size_t len, char *buf)
{
  return grub_fshelp_read_file (node->data->disk, node, read_hook,
				pos, len, buf, grub_affs_read_block,
				node->size, 0);
}
예제 #2
0
/* Read LEN bytes from the file described by DATA starting with byte
   POS.  Return the amount of read bytes in READ.  */
static grub_ssize_t
grub_hfsplus_read_file (grub_fshelp_node_t node,
			void NESTED_FUNC_ATTR (*read_hook) (grub_disk_addr_t sector,
					   unsigned offset, unsigned length),
			int pos, grub_size_t len, char *buf)
{
  return grub_fshelp_read_file (node->data->disk, node, read_hook,
				pos, len, buf, grub_hfsplus_read_block,
				node->size,
				node->data->log2blksize - GRUB_DISK_SECTOR_BITS);
}
예제 #3
0
파일: ext2.c 프로젝트: TemmeR/grub2
/* Read LEN bytes from the file described by DATA starting with byte
   POS.  Return the amount of read bytes in READ.  */
static grub_ssize_t
grub_ext2_read_file (grub_fshelp_node_t node,
		     void NESTED_FUNC_ATTR (*read_hook) (grub_disk_addr_t sector,
					unsigned offset, unsigned length),
		     int pos, grub_size_t len, char *buf)
{
  return grub_fshelp_read_file (node->data->disk, node, read_hook,
				pos, len, buf, grub_ext2_read_block,
				node->inode.size,
				LOG2_EXT2_BLOCK_SIZE (node->data));

}
예제 #4
0
파일: ext2.c 프로젝트: Firef0x/burg-new
/* Read LEN bytes from the file described by DATA starting with byte
   POS.  Return the amount of read bytes in READ.  */
static grub_ssize_t
grub_ext2_read_file (grub_fshelp_node_t node,
		     void (*read_hook) (grub_disk_addr_t sector,
					unsigned offset, unsigned length,
					void *closure),
		     void *closure, int flags,
		     int pos, grub_size_t len, char *buf)
{
  return grub_fshelp_read_file (node->data->disk, node, read_hook, closure,
				flags, pos, len, buf, grub_ext2_read_block,
				node->inode.size,
				LOG2_EXT2_BLOCK_SIZE (node->data));

}