summaryrefslogtreecommitdiffstats
path: root/fs/fs.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/fs.c')
-rw-r--r--fs/fs.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/fs.c b/fs/fs.c
index af73c8c..7dd6c03 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -692,12 +692,12 @@ int flush(int fd)
return ret;
}
-off_t lseek(int fildes, off_t offset, int whence)
+loff_t lseek(int fildes, loff_t offset, int whence)
{
struct device_d *dev;
struct fs_driver_d *fsdrv;
FILE *f = &files[fildes];
- off_t pos;
+ loff_t pos;
int ret;
if (check_fd(fildes))
@@ -1243,7 +1243,7 @@ static void memcpy_sz(void *_dst, const void *_src, ulong count, ulong rwsize)
}
}
-ssize_t mem_read(struct cdev *cdev, void *buf, size_t count, ulong offset, ulong flags)
+ssize_t mem_read(struct cdev *cdev, void *buf, size_t count, loff_t offset, ulong flags)
{
ulong size;
struct device_d *dev;
@@ -1252,13 +1252,13 @@ ssize_t mem_read(struct cdev *cdev, void *buf, size_t count, ulong offset, ulong
return -1;
dev = cdev->dev;
- size = min((ulong)count, dev->resource[0].size - offset);
+ size = min((loff_t)count, dev->resource[0].size - offset);
memcpy_sz(buf, dev_get_mem_region(dev, 0) + offset, size, flags & O_RWSIZE_MASK);
return size;
}
EXPORT_SYMBOL(mem_read);
-ssize_t mem_write(struct cdev *cdev, const void *buf, size_t count, ulong offset, ulong flags)
+ssize_t mem_write(struct cdev *cdev, const void *buf, size_t count, loff_t offset, ulong flags)
{
ulong size;
struct device_d *dev;
@@ -1267,7 +1267,7 @@ ssize_t mem_write(struct cdev *cdev, const void *buf, size_t count, ulong offset
return -1;
dev = cdev->dev;
- size = min((ulong)count, dev->resource[0].size - offset);
+ size = min((loff_t)count, dev->resource[0].size - offset);
memcpy_sz(dev_get_mem_region(dev, 0) + offset, buf, size, flags & O_RWSIZE_MASK);
return size;
}