diff options
Diffstat (limited to 'common/block.c')
-rw-r--r-- | common/block.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/common/block.c b/common/block.c index f3bcdc8181..7ad5ecc2f4 100644 --- a/common/block.c +++ b/common/block.c @@ -180,7 +180,7 @@ static void *block_get(struct block_device *blk, int block) } static ssize_t block_read(struct cdev *cdev, void *buf, size_t count, - unsigned long offset, unsigned long flags) + loff_t offset, unsigned long flags) { struct block_device *blk = cdev->priv; unsigned long mask = BLOCKSIZE(blk) - 1; @@ -257,7 +257,7 @@ static int block_put(struct block_device *blk, const void *buf, int block) } static ssize_t block_write(struct cdev *cdev, const void *buf, size_t count, - unsigned long offset, ulong flags) + loff_t offset, ulong flags) { struct block_device *blk = cdev->priv; unsigned long mask = BLOCKSIZE(blk) - 1; @@ -339,7 +339,7 @@ static struct file_operations block_ops = { int blockdevice_register(struct block_device *blk) { - size_t size = blk->num_blocks * BLOCKSIZE(blk); + loff_t size = (loff_t)blk->num_blocks * BLOCKSIZE(blk); int ret; int i; |