ftruncate: off_t is signed
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 <[email protected]>
--- fs/open.c | 2 +- include/linux/syscalls.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
fs/open.c +1 -1
@@ -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: */
include/linux/syscalls.h +1 -1
@@ -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,
Signature · 1 line
1.7.6