summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2015-03-01 13:32:08 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2015-03-03 08:23:46 +0100
commit89fc8c31ff873514039335494f39ba8517fa7e3a (patch)
treef3046324e3d245f6eea838335e0378bfaa290f3d
parentc961485abf4de08b5b38defc93de74435f0dae7e (diff)
downloadbarebox-89fc8c31ff873514039335494f39ba8517fa7e3a.tar.gz
barebox-89fc8c31ff873514039335494f39ba8517fa7e3a.tar.xz
fs: make "offset" parameter of erase() and protect() 64 bit safe
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--fs/fs.c4
-rw-r--r--include/fs.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/fs/fs.c b/fs/fs.c
index ffdfa2c0ff..779f2641b2 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -923,7 +923,7 @@ out:
}
EXPORT_SYMBOL(lseek);
-int erase(int fd, size_t count, unsigned long offset)
+int erase(int fd, size_t count, loff_t offset)
{
struct fs_driver_d *fsdrv;
FILE *f;
@@ -950,7 +950,7 @@ int erase(int fd, size_t count, unsigned long offset)
}
EXPORT_SYMBOL(erase);
-int protect(int fd, size_t count, unsigned long offset, int prot)
+int protect(int fd, size_t count, loff_t offset, int prot)
{
struct fs_driver_d *fsdrv;
FILE *f;
diff --git a/include/fs.h b/include/fs.h
index 63e35ca815..b8a95a20a7 100644
--- a/include/fs.h
+++ b/include/fs.h
@@ -147,8 +147,8 @@ int mount (const char *device, const char *fsname, const char *path,
int umount(const char *pathname);
/* not-so-standard functions */
-int erase(int fd, size_t count, unsigned long offset);
-int protect(int fd, size_t count, unsigned long offset, int prot);
+int erase(int fd, size_t count, loff_t offset);
+int protect(int fd, size_t count, loff_t offset, int prot);
int protect_file(const char *file, int prot);
void *memmap(int fd, int flags);