提交 d4e9cffa 编写于 作者: R Ralf Baechle

[MIPS] compat: handle argument endianess of sys32_(f)truncate64 with merge_64

Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
上级 0e8774b6
...@@ -174,36 +174,16 @@ struct rlimit32 { ...@@ -174,36 +174,16 @@ struct rlimit32 {
int rlim_max; int rlim_max;
}; };
#ifdef __MIPSEB__ asmlinkage long sys32_truncate64(const char __user * path,
asmlinkage long sys32_truncate64(const char __user * path, unsigned long __dummy, unsigned long __dummy, int a2, int a3)
int length_hi, int length_lo)
#endif
#ifdef __MIPSEL__
asmlinkage long sys32_truncate64(const char __user * path, unsigned long __dummy,
int length_lo, int length_hi)
#endif
{ {
loff_t length; return sys_truncate(path, merge_64(a2, a3));
length = ((unsigned long) length_hi << 32) | (unsigned int) length_lo;
return sys_truncate(path, length);
} }
#ifdef __MIPSEB__
asmlinkage long sys32_ftruncate64(unsigned int fd, unsigned long __dummy, asmlinkage long sys32_ftruncate64(unsigned int fd, unsigned long __dummy,
int length_hi, int length_lo) int a2, int a3)
#endif
#ifdef __MIPSEL__
asmlinkage long sys32_ftruncate64(unsigned int fd, unsigned long __dummy,
int length_lo, int length_hi)
#endif
{ {
loff_t length; return sys_ftruncate(fd, merge_64(a2, a3));
length = ((unsigned long) length_hi << 32) | (unsigned int) length_lo;
return sys_ftruncate(fd, length);
} }
static inline long static inline long
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册