[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1316282503.5814.20.camel@localhost.localdomain>
Date: Sat, 17 Sep 2011 20:01:43 +0200
From: Thomas Meyer <thomas@...3r.de>
To: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: [PATCH 2/3] ftruncate: off_t is signed
truncate() and ftruncate() both have a off_t length argument as input.
make both function use long instead of unsigned long.
Signed-off-by: Thomas Meyer <thomas@...3r.de>
---
fs/open.c | 2 +-
include/linux/syscalls.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/open.c b/fs/open.c
index f711921..2d607c7 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -175,7 +175,7 @@ out:
return error;
}
-SYSCALL_DEFINE2(ftruncate, unsigned int, fd, unsigned long, length)
+SYSCALL_DEFINE2(ftruncate, unsigned int, fd, long, length)
{
long ret = do_sys_ftruncate(fd, length, 1);
/* avoid REGPARM breakage on x86: */
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 1ff0ec2..ae81e1f 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -398,7 +398,7 @@ asmlinkage long sys_mount(char __user *dev_name, char __user *dir_name,
asmlinkage long sys_umount(char __user *name, int flags);
asmlinkage long sys_oldumount(char __user *name);
asmlinkage long sys_truncate(const char __user *path, long length);
-asmlinkage long sys_ftruncate(unsigned int fd, unsigned long length);
+asmlinkage long sys_ftruncate(unsigned int fd, long length);
asmlinkage long sys_stat(const char __user *filename,
struct __old_kernel_stat __user *statbuf);
asmlinkage long sys_statfs(const char __user * path,
--
1.7.6
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists