diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2011-10-14 13:46:09 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-06-30 16:53:24 +0200 |
commit | 3e503822c7379ffc1a1c60aed57eb81954451faa (patch) | |
tree | 49e4f7dd370954b7920606afdd82282f6e79e698 /fs/fat | |
parent | e71c34366808bbe3ce0b166d8710749513af6d81 (diff) | |
download | barebox-3e503822c7379ffc1a1c60aed57eb81954451faa.tar.gz barebox-3e503822c7379ffc1a1c60aed57eb81954451faa.tar.xz |
use loff_t for file offsets
This is a first step for 64bit file support: Make the file sizes/offsets
64bit.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'fs/fat')
-rw-r--r-- | fs/fat/fat.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/fat/fat.c b/fs/fat/fat.c index 21464bde95..5e6c81c358 100644 --- a/fs/fat/fat.c +++ b/fs/fat/fat.c @@ -49,7 +49,7 @@ DRESULT disk_read(FATFS *fat, BYTE *buf, DWORD sector, BYTE count) debug("%s: sector: %ld count: %d\n", __func__, sector, count); - ret = cdev_read(priv->cdev, buf, count << 9, sector * 512, 0); + ret = cdev_read(priv->cdev, buf, count << 9, (loff_t)sector * 512, 0); if (ret != count << 9) return ret; @@ -64,7 +64,7 @@ DRESULT disk_write(FATFS *fat, const BYTE *buf, DWORD sector, BYTE count) debug("%s: buf: %p sector: %ld count: %d\n", __func__, buf, sector, count); - ret = cdev_write(priv->cdev, buf, count << 9, sector * 512, 0); + ret = cdev_write(priv->cdev, buf, count << 9, (loff_t)sector * 512, 0); if (ret != count << 9) return ret; @@ -271,7 +271,7 @@ static int fat_read(struct device_d *_dev, FILE *f, void *buf, size_t insize) return outsize; } -static off_t fat_lseek(struct device_d *dev, FILE *f, off_t pos) +static loff_t fat_lseek(struct device_d *dev, FILE *f, loff_t pos) { FIL *f_file = f->inode; int ret; |