From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YS339-0004d4-Nf for barebox@lists.infradead.org; Sun, 01 Mar 2015 12:32:49 +0000 From: Marc Kleine-Budde Date: Sun, 1 Mar 2015 13:32:08 +0100 Message-Id: <1425213143-4529-3-git-send-email-mkl@pengutronix.de> In-Reply-To: <1425213143-4529-1-git-send-email-mkl@pengutronix.de> References: <1425213143-4529-1-git-send-email-mkl@pengutronix.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH v2 02/17] fs: make "offset" parameter of erase() and protect() 64 bit safe To: barebox@lists.infradead.org Signed-off-by: Marc Kleine-Budde --- fs/fs.c | 4 ++-- include/fs.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/fs.c b/fs/fs.c index ffdfa2c0ff39..779f2641b200 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 63e35ca815f5..b8a95a20a793 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); -- 2.1.4 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox