lkml.org 
[lkml]   [2011]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 2/3] ftruncate: off_t is signed
From
Date
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




\
 
 \ /
  Last update: 2011-09-18 10:07    [from the cache]
©2003-2011 Jasper Spaans