Lines Matching refs:block_dev
37 struct blk_desc *block_dev = dev_get_uclass_platdata(dev); local
40 static unsigned long host_block_read(struct blk_desc *block_dev,
44 int dev = block_dev->devnum;
51 if (os_lseek(host_dev->fd, start * block_dev->blksz, OS_SEEK_SET) ==
56 ssize_t len = os_read(host_dev->fd, buffer, blkcnt * block_dev->blksz);
58 return len / block_dev->blksz;
68 struct blk_desc *block_dev = dev_get_uclass_platdata(dev); local
70 static unsigned long host_block_write(struct blk_desc *block_dev,
74 int dev = block_dev->devnum;
78 if (os_lseek(host_dev->fd, start * block_dev->blksz, OS_SEEK_SET) ==
83 ssize_t len = os_write(host_dev->fd, buffer, blkcnt * block_dev->blksz);
85 return len / block_dev->blksz;