diff --git a/fs/devfs.c b/fs/devfs.c index 007dea9..aa44e32 100644 --- a/fs/devfs.c +++ b/fs/devfs.c @@ -168,7 +168,7 @@ return cdev_ioctl(cdev, request, buf); } -static int devfs_truncate(struct device_d *dev, FILE *f, ulong size) +static int devfs_truncate(struct device_d *dev, FILE *f, loff_t size) { struct cdev *cdev = f->priv; diff --git a/fs/efi.c b/fs/efi.c index cd4fee7..81c1ffe 100644 --- a/fs/efi.c +++ b/fs/efi.c @@ -305,7 +305,7 @@ return 0; } -static int efifs_truncate(struct device_d *dev, FILE *f, unsigned long size) +static int efifs_truncate(struct device_d *dev, FILE *f, loff_t size) { struct efifs_file *ufile = f->priv; efi_status_t efiret; diff --git a/fs/efivarfs.c b/fs/efivarfs.c index d261577..a911eac 100644 --- a/fs/efivarfs.c +++ b/fs/efivarfs.c @@ -288,7 +288,7 @@ return insize; } -static int efivarfs_truncate(struct device_d *dev, FILE *f, ulong size) +static int efivarfs_truncate(struct device_d *dev, FILE *f, loff_t size) { struct efivars_file *efile = f->priv; efi_status_t efiret; diff --git a/fs/fat/fat.c b/fs/fat/fat.c index 1367577..394c75f 100644 --- a/fs/fat/fat.c +++ b/fs/fat/fat.c @@ -177,7 +177,7 @@ return outsize; } -static int fat_truncate(struct device_d *dev, FILE *f, ulong size) +static int fat_truncate(struct device_d *dev, FILE *f, loff_t size) { FIL *f_file = f->priv; unsigned long lastofs; diff --git a/fs/nfs.c b/fs/nfs.c index c58fca7..43476d1 100644 --- a/fs/nfs.c +++ b/fs/nfs.c @@ -928,7 +928,7 @@ nfs_len = len; } -static int nfs_truncate(struct device_d *dev, FILE *f, ulong size) +static int nfs_truncate(struct device_d *dev, FILE *f, loff_t size) { return -ENOSYS; } diff --git a/fs/omap4_usbbootfs.c b/fs/omap4_usbbootfs.c index cc33287..169cde7 100644 --- a/fs/omap4_usbbootfs.c +++ b/fs/omap4_usbbootfs.c @@ -57,7 +57,7 @@ return -ENOSYS; } -static int omap4_usbbootfs_truncate(struct device_d *dev, FILE *f, ulong size) +static int omap4_usbbootfs_truncate(struct device_d *dev, FILE *f, loff_t size) { return -ENOSYS; } diff --git a/fs/ramfs.c b/fs/ramfs.c index 153b9b6..4fba40d 100644 --- a/fs/ramfs.c +++ b/fs/ramfs.c @@ -347,7 +347,7 @@ return insize; } -static int ramfs_truncate(struct device_d *dev, FILE *f, ulong size) +static int ramfs_truncate(struct device_d *dev, FILE *f, loff_t size) { struct inode *inode = f->f_inode; struct ramfs_inode *node = to_ramfs_inode(inode); diff --git a/fs/ratpfs.c b/fs/ratpfs.c index dffd276..b6857c6 100644 --- a/fs/ratpfs.c +++ b/fs/ratpfs.c @@ -77,7 +77,7 @@ } static int ratpfs_truncate(struct device_d __always_unused *dev, - FILE *f, ulong size) + FILE *f, loff_t size) { int len_tx = 1 /* type */ + 4 /* handle */ diff --git a/fs/smhfs.c b/fs/smhfs.c index 7a69336..2e99b05 100644 --- a/fs/smhfs.c +++ b/fs/smhfs.c @@ -56,7 +56,7 @@ static int smhfs_truncate(struct device_d __always_unused *dev, FILE __always_unused *f, - ulong __always_unused size) + loff_t __always_unused size) { return 0; } diff --git a/fs/tftp.c b/fs/tftp.c index 41f904f..4329327 100644 --- a/fs/tftp.c +++ b/fs/tftp.c @@ -93,7 +93,7 @@ IPaddr_t server; }; -static int tftp_truncate(struct device_d *dev, FILE *f, ulong size) +static int tftp_truncate(struct device_d *dev, FILE *f, loff_t size) { return 0; } diff --git a/include/fs.h b/include/fs.h index 68b6380..aa23bcc 100644 --- a/include/fs.h +++ b/include/fs.h @@ -46,7 +46,7 @@ int (*unlink)(struct device_d *dev, const char *pathname); /* Truncate a file to given size */ - int (*truncate)(struct device_d *dev, FILE *f, ulong size); + int (*truncate)(struct device_d *dev, FILE *f, loff_t size); int (*open)(struct device_d *dev, FILE *f, const char *pathname); int (*close)(struct device_d *dev, FILE *f);