The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH 2/3] ftruncate: off_t is signed
@ 2011-09-17 18:01 Thomas Meyer
  0 siblings, 0 replies; only message in thread
From: Thomas Meyer @ 2011-09-17 18:01 UTC (permalink / raw)
  To: Linux Kernel Mailing List

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@m3y3r.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




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-09-18  8:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-17 18:01 [PATCH 2/3] ftruncate: off_t is signed Thomas Meyer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox